package org.simantics.graph.matching; import gnu.trove.map.hash.TIntIntHashMap; import java.util.ArrayList; import org.simantics.databoard.binding.mutable.Variant; import org.simantics.graph.representation.External; import org.simantics.graph.representation.Identity; import org.simantics.graph.representation.Internal; import org.simantics.graph.representation.Optional; import org.simantics.graph.representation.Root; import org.simantics.graph.representation.TransferableGraph1; import org.simantics.graph.representation.Value; public class CanonicalGraph { int resourceCount; Stat[][] statements; TIntIntHashMap inverses = new TIntIntHashMap(); Identity[] identities; String[] names; Variant[] values; public CanonicalGraph(TransferableGraph1 tg) { this.resourceCount = tg.resourceCount; this.identities = tg.identities; int[] oldStatements = tg.statements; @SuppressWarnings("unchecked") ArrayList[] newStatements = new ArrayList[tg.resourceCount]; for(int i=0;i(2); for(int i=0;i= 0) { inverses.put(p, inv); inverses.put(inv, p); } } for(int i=0;i