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
5cd8d5c6
Commit
5cd8d5c6
authored
Jan 18, 2016
by
Tiago Peixoto
Browse files
Avoid unnecessary testing for valid vertices in unfiltered graphs in parallel loops
parent
8c8323af
Changes
44
Hide whitespace changes
Inline
Side-by-side
src/graph/centrality/graph_betweenness.cc
View file @
5cd8d5c6
...
...
@@ -48,8 +48,8 @@ void normalize_betweenness(const Graph& g,
schedule(runtime) if (N > 100)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
put
(
vertex_betweenness
,
v
,
vfactor
*
get
(
vertex_betweenness
,
v
));
}
...
...
src/graph/centrality/graph_closeness.hh
View file @
5cd8d5c6
...
...
@@ -72,17 +72,14 @@ struct get_closeness
for
(
i
=
0
;
i
<
N
;
++
i
)
{
vertex_t
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
unchecked_vector_property_map
<
val_type
,
VertexIndex
>
dist_map
(
vertex_index
,
num_vertices
(
g
));
for
(
int
j
=
0
;
j
<
N
;
++
j
)
{
if
(
vertex
(
j
,
g
)
!=
graph_traits
<
Graph
>::
null_vertex
())
dist_map
[
vertex
(
j
,
g
)]
=
numeric_limits
<
val_type
>::
max
();
}
for
(
auto
u
:
vertices_range
(
g
))
dist_map
[
u
]
=
numeric_limits
<
val_type
>::
max
();
dist_map
[
v
]
=
0
;
...
...
src/graph/centrality/graph_eigentrust.hh
View file @
5cd8d5c6
...
...
@@ -53,7 +53,7 @@ struct get_eigentrust
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
c_type
sum
=
0
;
...
...
@@ -77,7 +77,7 @@ struct get_eigentrust
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
c_sum
[
v
]
=
0
;
...
...
@@ -92,8 +92,8 @@ struct get_eigentrust
schedule(runtime) if (N > 100)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
t
[
v
]
=
1.0
/
V
;
}
...
...
@@ -108,7 +108,7 @@ struct get_eigentrust
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
t_temp
[
v
]
=
0
;
...
...
@@ -140,7 +140,7 @@ struct get_eigentrust
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
t
[
v
]
=
t_temp
[
v
];
}
...
...
src/graph/centrality/graph_eigenvector.hh
View file @
5cd8d5c6
...
...
@@ -64,7 +64,7 @@ struct get_eigenvector
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
c_temp
[
v
]
=
0
;
...
...
@@ -87,7 +87,7 @@ struct get_eigenvector
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
c_temp
[
v
]
/=
norm
;
delta
+=
abs
(
c_temp
[
v
]
-
c
[
v
]);
...
...
@@ -108,7 +108,7 @@ struct get_eigenvector
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
c
[
v
]
=
c_temp
[
v
];
}
...
...
src/graph/centrality/graph_hits.hh
View file @
5cd8d5c6
...
...
@@ -58,7 +58,7 @@ struct get_hits
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
x
[
v
]
=
1.0
/
V
;
y
[
v
]
=
1.0
/
V
;
...
...
@@ -76,7 +76,7 @@ struct get_hits
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
x_temp
[
v
]
=
0
;
...
...
@@ -109,7 +109,7 @@ struct get_hits
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
x_temp
[
v
]
/=
x_norm
;
y_temp
[
v
]
/=
y_norm
;
...
...
@@ -131,7 +131,7 @@ struct get_hits
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
x
[
v
]
=
x_temp
[
v
];
y
[
v
]
=
y_temp
[
v
];
...
...
src/graph/centrality/graph_katz.hh
View file @
5cd8d5c6
...
...
@@ -60,7 +60,7 @@ struct get_katz
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
c_temp
[
v
]
=
get
(
beta
,
v
);
...
...
@@ -81,7 +81,7 @@ struct get_katz
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
delta
+=
abs
(
c_temp
[
v
]
-
c
[
v
]);
}
...
...
@@ -99,7 +99,7 @@ struct get_katz
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
c_temp
[
v
]
=
c
[
v
];
}
...
...
src/graph/centrality/graph_pagerank.hh
View file @
5cd8d5c6
...
...
@@ -47,7 +47,7 @@ struct get_pagerank
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
put
(
deg
,
v
,
0
);
for
(
const
auto
&
e
:
out_edges_range
(
v
,
g
))
...
...
@@ -65,7 +65,7 @@ struct get_pagerank
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
rank_type
r
=
0
;
for
(
const
auto
&
e
:
in_or_out_edges_range
(
v
,
g
))
...
...
@@ -95,7 +95,7 @@ struct get_pagerank
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
put
(
rank
,
v
,
get
(
r_temp
,
v
));
}
...
...
src/graph/centrality/graph_trust_transitivity.hh
View file @
5cd8d5c6
...
...
@@ -108,7 +108,7 @@ struct get_trust_transitivity
for
(
i
=
0
;
i
<
N
;
++
i
)
{
vertex_t
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
t
[
v
].
resize
((
source
==
-
1
&&
target
==
-
1
)
?
N
:
1
);
}
...
...
@@ -118,7 +118,7 @@ struct get_trust_transitivity
for
(
i
=
(
target
==
-
1
)
?
0
:
target
;
i
<
N
;
++
i
)
{
vertex_t
tgt
=
vertex
(
i
,
g
);
if
(
tgt
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
tgt
,
g
))
continue
;
// mark the sources
...
...
@@ -212,7 +212,7 @@ struct get_trust_transitivity
for
(
j
=
0
;
j
<
N2
;
++
j
)
{
vertex_t
src
=
vertex
(
j
,
g
);
if
(
src
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
src
,
g
))
continue
;
t_type
weight
=
dist_map
[
src
];
sum_w
[
src
]
+=
weight
;
...
...
@@ -226,7 +226,7 @@ struct get_trust_transitivity
for
(
j
=
0
;
j
<
N2
;
++
j
)
{
vertex_t
src
=
vertex
(
j
,
g
);
if
(
src
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
src
,
g
))
continue
;
size_t
tidx
=
(
target
==
-
1
)
?
vertex_index
[
tgt
]
:
0
;
if
(
sum_w
[
src
]
>
0
)
...
...
src/graph/clustering/graph_clustering.hh
View file @
5cd8d5c6
...
...
@@ -102,8 +102,8 @@ struct get_global_clustering
schedule(runtime) if (N > 100) reduction(+:triangles, n)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
#ifdef USING_OPENMP
...
...
@@ -125,8 +125,8 @@ struct get_global_clustering
schedule(runtime) if (N > 100) reduction(+:cerr)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
#ifdef USING_OPENMP
...
...
@@ -167,8 +167,8 @@ struct set_clustering_to_property
schedule(runtime) if (N > 100)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
#ifdef USING_OPENMP
...
...
src/graph/clustering/graph_extended_clustering.hh
View file @
5cd8d5c6
...
...
@@ -125,7 +125,7 @@ struct get_extended_clustering
for
(
i
=
0
;
i
<
N
;
++
i
)
{
vertex_t
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
// We must disconsider paths through the original vertex
...
...
src/graph/clustering/graph_motifs.hh
View file @
5cd8d5c6
...
...
@@ -277,7 +277,7 @@ void get_sig(Graph& g, std::vector<size_t>& sig)
sig
.
resize
(
is_directed
::
apply
<
Graph
>::
type
::
value
?
2
*
N
:
N
);
for
(
size_t
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
au
to
v
=
vertex
(
i
,
g
);
sig
[
i
]
=
out_degree
(
v
,
g
);
if
(
is_directed
::
apply
<
Graph
>::
type
::
value
)
sig
[
i
+
N
]
=
in_degreeS
()(
v
,
g
);
...
...
@@ -363,7 +363,7 @@ struct get_all_motifs
subgraphs
;
typename
graph_traits
<
Graph
>::
vertex_descriptor
v
=
(
p
<
1
)
?
V
[
i
]
:
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
typename
wrap_undirected
::
apply
<
Graph
>::
type
ug
(
g
);
...
...
src/graph/community/graph_blockmodel.hh
View file @
5cd8d5c6
...
...
@@ -2680,7 +2680,7 @@ void move_sweep(vector<BlockState>& states, vector<MEntries>& m_entries_r,
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
for
(
auto
e
:
out_edges_range
(
v
,
g
))
E
+=
eweight
[
e
];
...
...
src/graph/community/graph_community.hh
View file @
5cd8d5c6
...
...
@@ -107,7 +107,7 @@ struct get_communities
for
(
i
=
0
;
i
<
NV
;
++
i
)
{
vertex_t
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
size_t
new_s
;
...
...
@@ -209,7 +209,7 @@ struct get_communities
for
(
i
=
0
;
i
<
NV
;
++
i
)
{
vertex_t
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
temp_s
[
v
]
=
s
[
v
];
}
...
...
src/graph/correlations/graph_assortativity.hh
View file @
5cd8d5c6
...
...
@@ -54,8 +54,8 @@ struct get_assortativity_coefficient
schedule(runtime) if (N > 100) reduction(+:e_kk, n_edges)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
val_t
k1
=
deg
(
v
,
g
);
...
...
@@ -91,8 +91,8 @@ struct get_assortativity_coefficient
reduction(+:err)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
val_t
k1
=
deg
(
v
,
g
);
...
...
@@ -135,8 +135,8 @@ struct get_scalar_assortativity_coefficient
schedule(runtime) if (N > 100) reduction(+:e_xy,n_edges,a,b,da,db)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
double
k1
=
double
(
deg
(
v
,
g
));
...
...
@@ -172,8 +172,8 @@ struct get_scalar_assortativity_coefficient
reduction(+:err)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
double
k1
=
double
(
deg
(
v
,
g
));
...
...
src/graph/correlations/graph_avg_correlations.hh
View file @
5cd8d5c6
...
...
@@ -70,8 +70,8 @@ struct get_avg_correlation
firstprivate(s_sum, s_sum2, s_count) schedule(runtime) if (N > 100)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
au
to
v
=
vertex
(
i
,
g
);
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
put_point
(
v
,
deg1
,
deg2
,
g
,
weight
,
s_sum
,
s_sum2
,
s_count
);
}
...
...
src/graph/correlations/graph_corr_hist.hh
View file @
5cd8d5c6
...
...
@@ -65,7 +65,7 @@ struct get_correlation_histogram
{
typename
graph_traits
<
Graph
>::
vertex_descriptor
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
put_point
(
v
,
deg1
,
deg2
,
g
,
weight
,
s_hist
);
}
...
...
src/graph/generation/graph_geometric.hh
View file @
5cd8d5c6
...
...
@@ -137,7 +137,7 @@ struct get_geometric
schedule(runtime) if (N > 100)
for
(
i
=
0
;
i
<
N
;
++
i
)
{
typename
graph_traits
<
Graph
>::
vertex_descrip
to
r
v
=
vertex
(
i
,
g
);
au
to
v
=
vertex
(
i
,
g
);
get_box
(
points
[
i
],
w
,
box
,
ranges
,
periodic_boundary
);
for
(
int
k
=
0
;
k
<
power
(
3
,
int
(
box
.
size
()));
++
k
)
...
...
src/graph/graph.cc
View file @
5cd8d5c6
...
...
@@ -87,7 +87,7 @@ struct clear_vertices
for
(
int
i
=
N
-
1
;
i
>=
0
;
--
i
)
{
auto
v
=
vertex
(
i
,
g
);
if
(
v
==
graph_traits
<
Graph
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
g
))
continue
;
remove_vertex
(
v
,
g
);
}
...
...
src/graph/graph_adjacency.hh
View file @
5cd8d5c6
...
...
@@ -574,8 +574,10 @@ out_edges(Vertex v, const adj_list<Vertex>& g)
{
typedef
typename
adj_list
<
Vertex
>::
out_edge_iterator
ei_t
;
typedef
typename
adj_list
<
Vertex
>::
make_out_edge
mk_edge
;
return
std
::
make_pair
(
ei_t
(
g
.
_out_edges
[
v
].
begin
(),
mk_edge
(
v
)),
ei_t
(
g
.
_out_edges
[
v
].
end
(),
mk_edge
(
v
)));
auto
&
edges
=
g
.
_out_edges
[
v
];
auto
mke
=
mk_edge
(
v
);
return
std
::
make_pair
(
ei_t
(
edges
.
begin
(),
mke
),
ei_t
(
edges
.
end
(),
mke
));
}
template
<
class
Vertex
>
...
...
@@ -586,8 +588,10 @@ in_edges(Vertex v, const adj_list<Vertex>& g)
{
typedef
typename
adj_list
<
Vertex
>::
in_edge_iterator
ei_t
;
typedef
typename
adj_list
<
Vertex
>::
make_in_edge
mk_edge
;
return
std
::
make_pair
(
ei_t
(
g
.
_in_edges
[
v
].
begin
(),
mk_edge
(
v
)),
ei_t
(
g
.
_in_edges
[
v
].
end
(),
mk_edge
(
v
)));
auto
&
edges
=
g
.
_in_edges
[
v
];
auto
mke
=
mk_edge
(
v
);
return
std
::
make_pair
(
ei_t
(
edges
.
begin
(),
mke
),
ei_t
(
edges
.
end
(),
mke
));
}
template
<
class
Vertex
>
...
...
@@ -597,8 +601,9 @@ std::pair<typename adj_list<Vertex>::adjacency_iterator,
adjacent_vertices
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
)
{
typedef
typename
adj_list
<
Vertex
>::
adjacency_iterator
ai_t
;
return
std
::
make_pair
(
ai_t
(
g
.
_out_edges
[
v
].
begin
()),
ai_t
(
g
.
_out_edges
[
v
].
end
()));
auto
&
edges
=
g
.
_out_edges
[
v
];
return
std
::
make_pair
(
ai_t
(
edges
.
begin
()),
ai_t
(
edges
.
end
()));
}
template
<
class
Vertex
>
...
...
src/graph/graph_copy.cc
View file @
5cd8d5c6
...
...
@@ -75,7 +75,7 @@ struct copy_vertex_property_dispatch
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
src
);
if
(
v
==
graph_traits
<
GraphSrc
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
src
))
continue
;
auto
new_v
=
vertex
(
index_map
[
i
],
tgt
);
p_tgt
[
new_v
]
=
p_src
[
v
];
...
...
@@ -146,7 +146,7 @@ struct copy_edge_property_dispatch
for
(
i
=
0
;
i
<
N
;
++
i
)
{
auto
v
=
vertex
(
i
,
src
);
if
(
v
==
graph_traits
<
GraphSrc
>::
null
_vertex
())
if
(
!
is_valid
_vertex
(
v
,
src
))
continue
;
for
(
auto
e
:
out_edges_range
(
v
,
src
))
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment