Class IsoMatcher

  • public class IsoMatcher
    extends java.lang.Object
    Simple isomorphism testing for on unordered collections. This code is simple and slow. For graphs, the Graph isomorphism code in Jena is much better (better tested, better performance) This code can work on any tuples of nodes. See Iso for isomorphism for ordered lists. See IsoAlg for the isomorphism algorithm.
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isomorphic​(java.util.Collection<org.apache.jena.atlas.lib.tuple.Tuple<Node>> x1, java.util.Collection<org.apache.jena.atlas.lib.tuple.Tuple<Node>> x2)
      Collection of tuples isomorphism
      static boolean isomorphic​(java.util.Collection<org.apache.jena.atlas.lib.tuple.Tuple<Node>> x1, java.util.Collection<org.apache.jena.atlas.lib.tuple.Tuple<Node>> x2, EqualityTest nodeTest)
      Collection of tuples isomorphism, with choice of when two nodes are "equal".
      static boolean isomorphic​(Graph g1, Graph g2)
      Graph isomorphism
      static boolean isomorphic​(DatasetGraph dsg1, DatasetGraph dsg2)
      Dataset isomorphism
      static java.util.List<org.apache.jena.atlas.lib.tuple.Tuple<Node>> tuplesQuads​(java.util.Iterator<Quad> iter)
      Helper - convert to List<Tuple<Node>>
      static java.util.List<org.apache.jena.atlas.lib.tuple.Tuple<Node>> tuplesTriples​(java.util.Iterator<Triple> iter)
      Helper - convert to List<Tuple<Node>>
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IsoMatcher

        public IsoMatcher()
    • Method Detail

      • isomorphic

        public static boolean isomorphic​(Graph g1,
                                         Graph g2)
        Graph isomorphism
      • isomorphic

        public static boolean isomorphic​(java.util.Collection<org.apache.jena.atlas.lib.tuple.Tuple<Node>> x1,
                                         java.util.Collection<org.apache.jena.atlas.lib.tuple.Tuple<Node>> x2)
        Collection of tuples isomorphism
      • tuplesTriples

        public static java.util.List<org.apache.jena.atlas.lib.tuple.Tuple<Node>> tuplesTriples​(java.util.Iterator<Triple> iter)
        Helper - convert to List<Tuple<Node>>
      • tuplesQuads

        public static java.util.List<org.apache.jena.atlas.lib.tuple.Tuple<Node>> tuplesQuads​(java.util.Iterator<Quad> iter)
        Helper - convert to List<Tuple<Node>>