Commit d177753
committed
Fixed bug in cycle detection algorithm caused by new graph format.
The getSmallestSetOfSmallestRings() method generates a copy of the graph
before applying the SSSR algorithm so as to not modify the original.
Before, this was safe because we could make a shallow copy and reuse the
same Vertex and Edge objects, since we didn't store any information about
the graph connectivity on these objects. Now that we are, we must make a
deep copy of the graph to use for the SSSR algorithm. As a result, we
also need to map the vertices of the copy back to those of the original
graph before returning.
This was causing the molecule drawing to fail for cyclic species; the
problem should now be fixed.1 parent 82b6a2b commit d177753
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
| 561 | + | |
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
566 | 567 | | |
567 | 568 | | |
568 | 569 | | |
| |||
630 | 631 | | |
631 | 632 | | |
632 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
633 | 638 | | |
634 | 639 | | |
635 | 640 | | |
| |||
0 commit comments