singa-bio / singa

:leaves: SiNGA (Simulation of Natural Systems using Graph Automata) is an open-source library containing tools especially for structural bioinformatics and systems biology.
MIT License
8 stars 2 forks source link

RISubgraphFinder has problems with directed graphs #82

Closed cleberecht closed 5 years ago

cleberecht commented 6 years ago

Trying to find pattern: target in target: pattern results in

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    at java.util.ArrayList.rangeCheck(ArrayList.java:657)
    at java.util.ArrayList.get(ArrayList.java:433)
    at bio.singa.mathematics.algorithms.graphs.isomorphism.RISubgraphFinder.growSearchSpace(RISubgraphFinder.java:235)
    at bio.singa.mathematics.algorithms.graphs.isomorphism.RISubgraphFinder.growSearchSpace(RISubgraphFinder.java:313)
    at bio.singa.mathematics.algorithms.graphs.isomorphism.RISubgraphFinder.matchTargetGraph(RISubgraphFinder.java:194)
    at bio.singa.mathematics.algorithms.graphs.isomorphism.RISubgraphFinder.<init>(RISubgraphFinder.java:61)
    at bio.singa.mathematics.algorithms.graphs.isomorphism.RISubgraphFinder.<init>(RISubgraphFinder.java:45)
    at bio.singa.javafx.renderer.graphs.DirectedGraphPlayground.main(DirectedGraphPlayground.java:57)

In branch feature/directed-graph-drawing i have created a test RISubgraphFinderTest and a playground DirectedGraphPlayground for this issue.

fkaiserbio commented 5 years ago
fkaiserbio commented 5 years ago

tested for cyclic directed graphs, closing now