Opened 10 years ago

Closed 10 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:

Description

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

        recur:
        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@… 10 years ago.
Proposed patch

Download all attachments as: .zip

Change History (2)

by tiago@…, 10 years ago

Attachment: isomorphism.patch added

Proposed patch

comment:1 by Jeremiah Willcock, 10 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.