Package org.apache.jena.sparql.util
Class IsoMatcher
- java.lang.Object
-
- org.apache.jena.sparql.util.IsoMatcher
-
public class IsoMatcher extends java.lang.ObjectSimple 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. SeeIsofor isomorphism for ordered lists. SeeIsoAlgfor the isomorphism algorithm.
-
-
Constructor Summary
Constructors Constructor Description IsoMatcher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisomorphic(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 isomorphismstatic booleanisomorphic(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 booleanisomorphic(Graph g1, Graph g2)Graph isomorphismstatic booleanisomorphic(DatasetGraph dsg1, DatasetGraph dsg2)Dataset isomorphismstatic java.util.List<org.apache.jena.atlas.lib.tuple.Tuple<Node>>tuplesQuads(java.util.Iterator<Quad> iter)Helper - convert toList<Tuple<Node>>static java.util.List<org.apache.jena.atlas.lib.tuple.Tuple<Node>>tuplesTriples(java.util.Iterator<Triple> iter)Helper - convert toList<Tuple<Node>>
-
-
-
Method Detail
-
isomorphic
public static boolean isomorphic(DatasetGraph dsg1, DatasetGraph dsg2)
Dataset 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 toList<Tuple<Node>>
-
tuplesQuads
public static java.util.List<org.apache.jena.atlas.lib.tuple.Tuple<Node>> tuplesQuads(java.util.Iterator<Quad> iter)
Helper - convert toList<Tuple<Node>>
-
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, EqualityTest nodeTest)
Collection of tuples isomorphism, with choice of when two nodes are "equal". See alsoIsoAlg.isIsomorphic(Collection, Collection, org.apache.jena.sparql.util.Iso.Mappable, EqualityTest)for isomorphisms testing for more than just blank nodes.
-
-