Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
bf0e2475
Commit
bf0e2475
authored
Jan 07, 2020
by
Tiago Peixoto
Browse files
Switch to C++ syntax for function attributes
parent
161d5214
Changes
13
Hide whitespace changes
Inline
Side-by-side
src/graph/fast_vector_property_map.hh
View file @
bf0e2475
...
...
@@ -132,6 +132,7 @@ public:
}
public:
[[
gnu
::
always_inline
]]
reference
operator
[](
const
key_type
&
v
)
const
{
auto
i
=
get
(
_index
,
v
);
auto
&
store
=
*
_store
;
...
...
@@ -180,7 +181,7 @@ public:
void
shrink_to_fit
()
const
{
_checked
.
shrink_to_fit
();
}
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
reference
operator
[](
const
key_type
&
v
)
const
{
return
(
*
_checked
.
_store
)[
get
(
_checked
.
_index
,
v
)];
...
...
src/graph/graph_adaptor.hh
View file @
bf0e2475
...
...
@@ -124,7 +124,7 @@ struct graph_traits< const undirected_adaptor<Graph> >:
// source(e,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
[[
gnu
::
pure
]]
inline
auto
source
(
const
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
edge_descriptor
&
e
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -136,7 +136,7 @@ source(const typename graph_traits<undirected_adaptor<Graph> >::edge_descriptor&
// target(e,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
[[
gnu
::
pure
]]
inline
auto
target
(
const
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
edge_descriptor
&
e
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -148,7 +148,7 @@ target(const typename graph_traits<undirected_adaptor<Graph> >::edge_descriptor&
// vertex(n,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
[[
gnu
::
pure
]]
inline
auto
vertex
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertices_size_type
n
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -160,7 +160,7 @@ vertex(typename graph_traits<undirected_adaptor<Graph> >::vertices_size_type n,
// vertices(g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
vertices
(
const
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -171,7 +171,7 @@ vertices(const undirected_adaptor<Graph>& g)
// edges(g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
edges
(
const
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -182,7 +182,7 @@ edges(const undirected_adaptor<Graph>& g)
// edge(u, v, g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
auto
edge
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
v
,
...
...
@@ -203,7 +203,7 @@ edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
// out_edges(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
out_edges
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -212,7 +212,7 @@ out_edges(typename graph_traits<undirected_adaptor<Graph>>::vertex_descriptor u,
}
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
_all_edges_out
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -224,7 +224,7 @@ _all_edges_out(typename graph_traits<undirected_adaptor<Graph>>::vertex_descript
// in_edges(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
in_edges
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>>::
vertex_descriptor
,
const
undirected_adaptor
<
Graph
>&
)
...
...
@@ -235,7 +235,7 @@ in_edges(typename graph_traits<undirected_adaptor<Graph>>::vertex_descriptor,
}
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
_all_edges_in
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -244,7 +244,7 @@ _all_edges_in(typename graph_traits<undirected_adaptor<Graph>>::vertex_descripto
}
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
all_edges
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -256,7 +256,7 @@ all_edges(typename graph_traits<undirected_adaptor<Graph>>::vertex_descriptor u,
// out_neighbors(u, g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
out_neighbors
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -268,7 +268,7 @@ out_neighbors(typename graph_traits<undirected_adaptor<Graph> >::vertex_descript
// in_neighbors(u, g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
in_neighbors
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -280,7 +280,7 @@ in_neighbors(typename graph_traits<undirected_adaptor<Graph> >::vertex_descripto
// all_neighbors(u, g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
all_neighbors
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -292,7 +292,7 @@ all_neighbors(typename graph_traits<undirected_adaptor<Graph> >::vertex_descript
// adjacent_vertices(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
adjacent_vertices
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
...
...
@@ -305,7 +305,7 @@ adjacent_vertices
// num_vertices(g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
num_vertices
(
const
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -316,7 +316,7 @@ num_vertices(const undirected_adaptor<Graph>& g)
// num_edges(g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
num_edges
(
const
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -327,7 +327,7 @@ num_edges(const undirected_adaptor<Graph>& g)
// out_degree(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
out_degree
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -339,7 +339,7 @@ out_degree(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor
// in_degree(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
in_degree
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
,
const
undirected_adaptor
<
Graph
>&
)
...
...
@@ -351,7 +351,7 @@ in_degree(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor,
// degree(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
auto
degree
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
const
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -364,7 +364,7 @@ degree(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
// add_vertex(g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
auto
add_vertex
(
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -375,7 +375,7 @@ add_vertex(undirected_adaptor<Graph>& g)
// add_vertex(vp,g)
//==============================================================================
template
<
class
Graph
,
class
VertexProperties
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
auto
add_vertex
(
const
VertexProperties
&
p
,
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -386,7 +386,7 @@ add_vertex(const VertexProperties& p, undirected_adaptor<Graph>& g)
// clear_vertex(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
void
clear_vertex
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -397,7 +397,7 @@ void clear_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_desc
// clear_vertex(u,g,pred)
//==============================================================================
template
<
class
Graph
,
class
Pred
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
void
clear_vertex
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
undirected_adaptor
<
Graph
>&
g
,
Pred
&&
pred
)
{
...
...
@@ -408,7 +408,7 @@ void clear_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_desc
// remove_vertex(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
void
remove_vertex
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -419,7 +419,7 @@ void remove_vertex(typename graph_traits<undirected_adaptor<Graph> >::vertex_des
// remove_vertex_fast(u,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
void
remove_vertex_fast
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -430,7 +430,7 @@ void remove_vertex_fast(typename graph_traits<undirected_adaptor<Graph> >::verte
// add_edge(u,v,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
edge_descriptor
,
bool
>
add_edge
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
...
...
@@ -444,7 +444,7 @@ add_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
// add_edge(u,v,ep,g)
//==============================================================================
template
<
class
Graph
,
class
EdgeProperties
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
auto
add_edge
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
v
,
...
...
@@ -457,7 +457,7 @@ add_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descriptor u,
// remove_edge(u,v,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
void
remove_edge
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
u
,
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
v
,
undirected_adaptor
<
Graph
>&
g
)
...
...
@@ -471,7 +471,7 @@ void remove_edge(typename graph_traits<undirected_adaptor<Graph> >::vertex_descr
// remove_edge(e,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
void
remove_edge
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
edge_descriptor
e
,
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -484,7 +484,7 @@ void remove_edge(typename graph_traits<undirected_adaptor<Graph> >::edge_descrip
// remove_edge(e_iter,g)
//==============================================================================
template
<
class
Graph
>
inline
__attribute__
((
flatten
))
[[
gnu
::
flatten
]]
inline
void
remove_edge
(
const
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
out_edge_iterator
&
iter
,
undirected_adaptor
<
Graph
>&
g
)
{
...
...
@@ -512,7 +512,6 @@ void remove_out_edge_if(typename graph_traits<undirected_adaptor<Graph> >::verte
// remove_in_edge_if(v,predicate,g)
//==============================================================================
template
<
class
Graph
,
class
Predicate
>
inline
void
remove_in_edge_if
(
typename
graph_traits
<
undirected_adaptor
<
Graph
>
>::
vertex_descriptor
v
,
Predicate
predicate
,
undirected_adaptor
<
Graph
>&
g
)
{
...
...
src/graph/graph_adjacency.hh
View file @
bf0e2475
...
...
@@ -222,7 +222,7 @@ public:
{
get_vertex
()
{}
typedef
Vertex
result_type
;
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
Vertex
operator
()(
const
std
::
pair
<
vertex_t
,
vertex_t
>&
v
)
const
{
return
v
.
first
;
}
};
...
...
@@ -261,7 +261,7 @@ public:
return
_iter
==
other
.
_iter
;
}
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
edge_descriptor
dereference
()
const
{
return
Deference
::
def
(
_v
,
*
_iter
,
*
this
);
...
...
@@ -480,7 +480,7 @@ public:
_epos
.
shrink_to_fit
();
}
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
void
reverse_edge
(
edge_descriptor
&
e
)
const
{
auto
&
elist
=
_edges
[
e
.
s
];
...
...
@@ -698,7 +698,7 @@ struct graph_property_type<adj_list<Vertex> >
//========================================================================
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
vertex_iterator
,
typename
adj_list
<
Vertex
>::
vertex_iterator
>
vertices
(
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -709,7 +709,7 @@ vertices(const adj_list<Vertex>& g)
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
edge_iterator
,
typename
adj_list
<
Vertex
>::
edge_iterator
>
edges
(
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -740,7 +740,7 @@ edges(const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
Vertex
vertex
(
size_t
i
,
const
adj_list
<
Vertex
>&
)
{
return
i
;
...
...
@@ -764,7 +764,7 @@ edge(Vertex s, Vertex t, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
size_t
out_degree
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
{
const
auto
&
pes
=
g
.
_edges
[
v
];
...
...
@@ -772,7 +772,7 @@ size_t out_degree(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
size_t
in_degree
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
{
const
auto
&
pes
=
g
.
_edges
[
v
];
...
...
@@ -782,14 +782,14 @@ size_t in_degree(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
size_t
degree
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
{
return
g
.
_edges
[
v
].
second
.
size
();
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
out_edge_iterator
,
typename
adj_list
<
Vertex
>::
out_edge_iterator
>
out_edges
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -802,7 +802,7 @@ out_edges(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
in_edge_iterator
,
typename
adj_list
<
Vertex
>::
in_edge_iterator
>
in_edges
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -815,7 +815,7 @@ in_edges(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
out_edge_iterator
,
typename
adj_list
<
Vertex
>::
out_edge_iterator
>
_all_edges_out
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -827,7 +827,7 @@ _all_edges_out(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
in_edge_iterator
,
typename
adj_list
<
Vertex
>::
in_edge_iterator
>
_all_edges_in
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -839,7 +839,7 @@ _all_edges_in(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
all_edge_iterator
,
typename
adj_list
<
Vertex
>::
all_edge_iterator
>
all_edges
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -852,7 +852,7 @@ all_edges(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
all_edge_iterator_reversed
,
typename
adj_list
<
Vertex
>::
all_edge_iterator_reversed
>
_all_edges_reversed
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -865,7 +865,7 @@ _all_edges_reversed(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
adjacency_iterator
,
typename
adj_list
<
Vertex
>::
adjacency_iterator
>
out_neighbors
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -878,7 +878,7 @@ out_neighbors(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
adjacency_iterator
,
typename
adj_list
<
Vertex
>::
adjacency_iterator
>
in_neighbors
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -891,7 +891,7 @@ in_neighbors(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
adjacency_iterator
,
typename
adj_list
<
Vertex
>::
adjacency_iterator
>
all_neighbors
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -903,7 +903,7 @@ all_neighbors(Vertex v, const adj_list<Vertex>& g)
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
adjacency_iterator
,
typename
adj_list
<
Vertex
>::
adjacency_iterator
>
adjacent_vertices
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
...
...
@@ -913,14 +913,14 @@ adjacent_vertices(Vertex v, const adj_list<Vertex>& g)
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
size_t
num_vertices
(
const
adj_list
<
Vertex
>&
g
)
{
return
g
.
_edges
.
size
();
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
size_t
num_edges
(
const
adj_list
<
Vertex
>&
g
)
{
return
g
.
_n_edges
;
...
...
@@ -1061,7 +1061,7 @@ void remove_edge(const typename adj_list<Vertex>::edge_descriptor& e,
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
Vertex
add_vertex
(
adj_list
<
Vertex
>&
g
)
{
g
.
_edges
.
emplace_back
();
...
...
@@ -1241,7 +1241,7 @@ void remove_vertex_fast(Vertex v, adj_list<Vertex>& g)
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
Vertex
source
(
const
typename
adj_list
<
Vertex
>::
edge_descriptor
&
e
,
const
adj_list
<
Vertex
>&
)
{
...
...
@@ -1249,7 +1249,7 @@ Vertex source(const typename adj_list<Vertex>::edge_descriptor& e,
}
template
<
class
Vertex
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
Vertex
target
(
const
typename
adj_list
<
Vertex
>::
edge_descriptor
&
e
,
const
adj_list
<
Vertex
>&
)
{
...
...
@@ -1327,7 +1327,7 @@ template <class Vertex>
struct
hash
<
boost
::
detail
::
adj_edge_descriptor
<
Vertex
>>
{
template
<
class
Edge
>
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
std
::
size_t
operator
()(
Edge
const
&
e
)
const
{
return
_h
(
e
.
idx
);
...
...
src/graph/graph_filtered.hh
View file @
bf0e2475
...
...
@@ -275,7 +275,7 @@ make_filt_graph(const Graph& g, EdgePredicate ep, VertexPredicate vp)
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_iterator
>
vertices
(
const
filt_graph
<
G
,
EP
,
VP
>&
g
)
...
...
@@ -289,7 +289,7 @@ vertices(const filt_graph<G, EP, VP>& g)
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
[[
gnu
::
always_inline
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
edge_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
edge_iterator
>
edges
(
const
filt_graph
<
G
,
EP
,
VP
>&
g
)
...
...
@@ -362,7 +362,7 @@ target(const typename filt_graph_base<G>::edge_descriptor& e,
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
out_edge_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
out_edge_iterator
>
out_edges
(
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_descriptor
u
,
...
...
@@ -376,7 +376,7 @@ out_edges(typename filt_graph<G, EP, VP>::vertex_descriptor u,
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
out_edge_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
out_edge_iterator
>
_all_edges_out
(
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_descriptor
u
,
...
...
@@ -412,7 +412,7 @@ degree(typename filt_graph<G, EP, VP>::vertex_descriptor u,
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
adjacency_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
adjacency_iterator
>
out_neighbors
(
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_descriptor
u
,
...
...
@@ -426,7 +426,7 @@ out_neighbors(typename filt_graph<G, EP, VP>::vertex_descriptor u,
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
in_adjacency_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
in_adjacency_iterator
>
in_neighbors
(
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_descriptor
u
,
...
...
@@ -440,7 +440,7 @@ in_neighbors(typename filt_graph<G, EP, VP>::vertex_descriptor u,
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
adjacency_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
adjacency_iterator
>
all_neighbors
(
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_descriptor
u
,
...
...
@@ -454,7 +454,7 @@ all_neighbors(typename filt_graph<G, EP, VP>::vertex_descriptor u,
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
adjacency_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
adjacency_iterator
>
adjacent_vertices
(
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_descriptor
u
,
...
...
@@ -464,7 +464,7 @@ adjacent_vertices(typename filt_graph<G, EP, VP>::vertex_descriptor u,
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
in_edge_iterator
,
typename
filt_graph
<
G
,
EP
,
VP
>::
in_edge_iterator
>
in_edges
(
typename
filt_graph
<
G
,
EP
,
VP
>::
vertex_descriptor
u
,
...
...
@@ -478,7 +478,7 @@ in_edges(typename filt_graph<G, EP, VP>::vertex_descriptor u,
}
template
<
typename
G
,
typename
EP
,
typename
VP
>
inline
__attribute__
((
always_inline
))
__attribute__
((
flatten
))
[[
gnu
::
always_inline
]]
[[
gnu
::
flatten
]]
inline
std
::
pair
<
typename
filt_graph
<
G
,
EP
,
VP
>::
in_edge_iterator
,