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
5b6034b0
Commit
5b6034b0
authored
May 29, 2020
by
Tiago Peixoto
Browse files
isomorphism(): fix bug with large vertex invariants
This fixes issues #653 and #655
parent
ac6a7a71
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/topology/__init__.py
View file @
5b6034b0
...
...
@@ -595,15 +595,11 @@ def isomorphism(g1, g2, vertex_inv1=None, vertex_inv2=None, isomap=False):
if
vertex_inv1
is
None
:
vertex_inv1
=
g1
.
degree_property_map
(
"total"
).
copy
(
"int64_t"
)
else
:
vertex_inv1
=
vertex_inv1
.
copy
(
"int64_t"
)
d
=
g1
.
degree_property_map
(
"total"
)
vertex_inv1
.
fa
+=
(
vertex_inv1
.
fa
.
max
()
+
1
)
*
d
.
a
vertex_inv1
=
perfect_prop_hash
([
vertex_inv1
])[
0
].
copy
(
"int64_t"
)
if
vertex_inv2
is
None
:
vertex_inv2
=
g2
.
degree_property_map
(
"total"
).
copy
(
"int64_t"
)
else
:
vertex_inv2
=
vertex_inv2
.
copy
(
"int64_t"
)
d
=
g2
.
degree_property_map
(
"total"
)
vertex_inv2
.
fa
+=
(
vertex_inv2
.
fa
.
max
()
+
1
)
*
d
.
a
vertex_inv2
=
perfect_prop_hash
([
vertex_inv2
])[
0
].
copy
(
"int64_t"
)
inv_max
=
max
(
vertex_inv1
.
fa
.
max
(),
vertex_inv2
.
fa
.
max
())
+
1
...
...
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