
org.sdmlib.models.pattern.IsomorphismComputation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SDMLib Show documentation
Show all versions of SDMLib Show documentation
SDMLib is a light weight modeling library. SDMLib intentionally comes without any tool or editor.
package org.sdmlib.models.pattern;
import de.uniks.networkparser.IdMap;
import de.uniks.networkparser.list.SimpleKeyValueList;
public class IsomorphismComputation
{
public static boolean calculateMatch(Object graph1, Object graph2, IdMap creators)
{
ReachabilityGraph reachabilityGraph = new ReachabilityGraph();
reachabilityGraph.withMasterMap ( new IdMap().withSession("s").with(creators));
ReachableState rs1 = new ReachableState().withGraphRoot(graph1).withParent(reachabilityGraph);
ReachableState rs2 = new ReachableState().withGraphRoot(graph2).withParent(reachabilityGraph);
Object s1cert = rs1.dynComputeCertificate();
Object s2cert = rs2.dynComputeCertificate();
return reachabilityGraph.lazyMatch(rs1, rs2) != null;
}
public static boolean isIsomorphic(Object graph1, Object graph2, IdMap creators)
{
return calculateMatch(graph1, graph2, creators);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy