Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
43
Issues
43
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
5b6034b0
Commit
5b6034b0
authored
May 29, 2020
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
isomorphism(): fix bug with large vertex invariants
This fixes issues
#653
and
#655
parent
ac6a7a71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
src/graph_tool/topology/__init__.py
src/graph_tool/topology/__init__.py
+2
-6
No files found.
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):
...
@@ -595,15 +595,11 @@ def isomorphism(g1, g2, vertex_inv1=None, vertex_inv2=None, isomap=False):
if
vertex_inv1
is
None
:
if
vertex_inv1
is
None
:
vertex_inv1
=
g1
.
degree_property_map
(
"total"
).
copy
(
"int64_t"
)
vertex_inv1
=
g1
.
degree_property_map
(
"total"
).
copy
(
"int64_t"
)
else
:
else
:
vertex_inv1
=
vertex_inv1
.
copy
(
"int64_t"
)
vertex_inv1
=
perfect_prop_hash
([
vertex_inv1
])[
0
].
copy
(
"int64_t"
)
d
=
g1
.
degree_property_map
(
"total"
)
vertex_inv1
.
fa
+=
(
vertex_inv1
.
fa
.
max
()
+
1
)
*
d
.
a
if
vertex_inv2
is
None
:
if
vertex_inv2
is
None
:
vertex_inv2
=
g2
.
degree_property_map
(
"total"
).
copy
(
"int64_t"
)
vertex_inv2
=
g2
.
degree_property_map
(
"total"
).
copy
(
"int64_t"
)
else
:
else
:
vertex_inv2
=
vertex_inv2
.
copy
(
"int64_t"
)
vertex_inv2
=
perfect_prop_hash
([
vertex_inv2
])[
0
].
copy
(
"int64_t"
)
d
=
g2
.
degree_property_map
(
"total"
)
vertex_inv2
.
fa
+=
(
vertex_inv2
.
fa
.
max
()
+
1
)
*
d
.
a
inv_max
=
max
(
vertex_inv1
.
fa
.
max
(),
vertex_inv2
.
fa
.
max
())
+
1
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