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
d0871cee
Commit
d0871cee
authored
Apr 30, 2014
by
Tiago Peixoto
Browse files
Fix bug in label_largest_component() with filtered graphs
parent
b88b299a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/topology/__init__.py
View file @
d0871cee
...
...
@@ -808,10 +808,7 @@ def label_largest_component(g, directed=None):
label
=
g
.
new_vertex_property
(
"bool"
)
c
,
h
=
label_components
(
g
,
directed
=
directed
)
vfilt
,
inv
=
g
.
get_vertex_filter
()
if
vfilt
is
None
:
label
.
a
=
c
.
a
==
h
.
argmax
()
else
:
label
.
a
=
(
c
.
a
==
h
.
argmax
())
&
(
vfilt
.
a
^
inv
)
label
.
fa
=
c
.
fa
==
h
.
argmax
()
return
label
...
...
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