Skip to content

Using MatchHelper

Inno Fang edited this page Jun 3, 2019 · 2 revisions

If you want to find a subgraph isomorphism between two graphs in a simpler way, you can use MatchHelper

String sourceGraphPath = "...";
String targetGraphPath = "...";

try {
    MatchHelper.testIsomorphismAlgorithm(
        targetGraphPath,
        sourceGraphPath,
        UllmannState.class,
        new GraphDBDataSet(),    // target graph reading strategy
        // If two graph have the same read strategy, the follow one parameter can be omit.
        new GraphDBDataSet(),    // source graph reading strategy
        mapping -> {
            System.out.println(mapping.toString());
            return false;
        }
    );
catch (Exception e) {
    e.printStackTrace();
}