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
9d541760
Commit
9d541760
authored
Feb 17, 2014
by
Tiago Peixoto
Browse files
Make PropertyMap.fa properly handle graphs with non-contiguous edge indexes
parent
8aefa447
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/__init__.py
View file @
9d541760
...
...
@@ -541,9 +541,13 @@ class PropertyMap(object):
if
g
.
get_vertex_filter
()[
0
]
is
not
None
:
filt
=
(
g
.
new_edge_property
(
"bool"
),
filt
[
1
])
u
=
GraphView
(
g
,
directed
=
True
,
skip_properties
=
True
)
libcore
.
mark_edges
(
u
.
_Graph__graph
,
_prop
(
"e"
,
g
,
filt
[
0
]))
libcore
.
mark_edges
(
u
.
_Graph__graph
,
_prop
(
"e"
,
u
,
filt
[
0
]))
if
filt
[
1
]:
filt
[
0
].
a
=
1
-
filt
[
0
].
a
elif
g
.
_get_max_edge_index
()
!=
g
.
num_edges
():
filt
=
(
g
.
new_edge_property
(
"bool"
),
False
)
u
=
GraphView
(
g
,
directed
=
True
,
skip_properties
=
True
)
libcore
.
mark_edges
(
u
.
_Graph__graph
,
_prop
(
"e"
,
u
,
filt
[
0
]))
if
get
:
if
a
is
None
:
return
a
...
...
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