Opened 5 years ago

Closed 5 years ago

#7845 closed Bugs (fixed)

[BGL] Bug in isomorphism when the two graphs are of different types

Reported by: tiago@… Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.52.0 Severity: Problem
Keywords: isomorphism, bgl Cc:


The isomorphism implementation checks for the source and target (i, j) of the edge being considered in G2, where it clearly should be G1:

        if (iter != ordered_edges.end()) {
          i = source(*iter, G1);
          j = target(*iter, G2);

In the last line, G2 should be G1, otherwise it will not even compile if the graphs have different types of edge descriptors (not to mention it does not make any sense). Note that this is also wrong in the 'literate' documentation provided on the website.

Furthermore the use of "num_vertices" when checking the size of both graphs makes it impossible to use with filtered graphs.

I'm attaching a patch which fixes both these issues.

Attachments (1)

isomorphism.patch (3.9 KB) - added by tiago@… 5 years ago.
Proposed patch

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by tiago@…

Attachment: isomorphism.patch added

Proposed patch

comment:1 Changed 5 years ago by Jeremiah Willcock

Resolution: fixed
Status: newclosed

(In [82358]) Applied variant of patch from #7845; fixes #7845

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jeremiah Willcock.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.