Class StatsMatcher

java.lang.Object
org.apache.jena.sparql.engine.optimizer.StatsMatcher

public final class StatsMatcher extends Object
Stats format:
 (stats
    (meta ...)
    ((S P O) weight)
    (<predicate uri> weight)
 )
 
where S, P, O is a URI, variable, literal or one of the words ANY (matches anything), VAR (matches a variable), TERM (matches a fixed URI, or literal), URI, BNODE, LITERAL (matches one of these types).
  • Field Details

  • Constructor Details

    • StatsMatcher

      public StatsMatcher()
    • StatsMatcher

      public StatsMatcher(String filename)
    • StatsMatcher

      public StatsMatcher(Item stats)
  • Method Details

    • addPatterns

      public void addPatterns(org.apache.jena.graph.Node predicate, double numProp)
      Add patterns based solely on the predicate count and some guessing
    • addPatternsSmall

      public void addPatternsSmall(org.apache.jena.graph.Node predicate, double numProp)
      Add patterns based solely on the predicate count and some guessing for a small graph (less than a few thousand triples)
    • addPattern

      public void addPattern(Pattern pattern)
    • match

      public double match(org.apache.jena.graph.Triple t)
    • match

      public double match(PatternTriple pTriple)
    • match

      public double match(Item subj, Item pred, Item obj)
      Return the matching weight for the first triple match found, else apply default value for fixed, unknown predicate, else return NOMATCH
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • printSSE

      public void printSSE(OutputStream ps)