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
c9afd8cc
Commit
c9afd8cc
authored
Nov 03, 2012
by
Tiago Peixoto
Browse files
Fix bug in graph_copy()
parent
e9ebd2f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/graph/clustering/graph_motifs.cc
View file @
c9afd8cc
...
...
@@ -61,6 +61,7 @@ struct retrieve_from_list
return
;
}
graph_copy
(
glist
.
back
(),
g
);
glist
.
pop_back
();
}
};
...
...
src/graph/graph_util.hh
View file @
c9afd8cc
...
...
@@ -157,7 +157,7 @@ void graph_copy(const GraphOrig& g, GraphTarget& gt)
typename
property_map
<
GraphOrig
,
vertex_index_t
>::
type
index
=
get
(
vertex_index
,
g
);
typedef
typename
graph_traits
<
GraphOrig
>::
vertex_descriptor
vertex_t
;
typedef
typename
graph_traits
<
GraphTarget
>::
vertex_descriptor
tvertex_t
;
vector
<
tvertex_t
>
vmap
;
vector
<
tvertex_t
>
vmap
(
num_vertices
(
g
))
;
typename
graph_traits
<
GraphOrig
>::
vertex_iterator
v
,
v_end
;
for
(
tie
(
v
,
v_end
)
=
vertices
(
g
);
v
!=
v_end
;
++
v
)
vmap
[
index
[
*
v
]]
=
add_vertex
(
gt
);
...
...
src/graph_tool/clustering/__init__.py
View file @
c9afd8cc
...
...
@@ -248,7 +248,7 @@ def extended_clustering(g, props=None, max_depth=3, undirected=False):
>>> clusts = gt.extended_clustering(g, max_depth=5)
>>> for i in range(0, 5):
... print(gt.vertex_average(g, clusts[i]))
...
...
(0.0058850000000000005, 0.0004726257592782405)
(0.026346666666666668, 0.0009562588213100747)
(0.11638833333333333, 0.002086419787711849)
...
...
Write
Preview
Markdown
is supported
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