java.lang.Object
org.apache.jena.sparql.engine.optimizer.StatsMatcher
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPattern(Pattern pattern) voidaddPatterns(org.apache.jena.graph.Node predicate, double numProp) Add patterns based solely on the predicate count and some guessingvoidaddPatternsSmall(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)doublematch(org.apache.jena.graph.Triple t) doublematch(PatternTriple pTriple) doubleReturn the matching weight for the first triple match found, else apply default value for fixed, unknown predicate, else return NOMATCHvoidprintSSE(OutputStream ps) toString()
-
Field Details
-
STATS
- See Also:
-
META
- See Also:
-
COUNT
- See Also:
-
OTHER
-
weightSP
public static final double weightSP- See Also:
-
weightPO
public static final double weightPO- See Also:
-
weightTypeO
public static final double weightTypeO- See Also:
-
weightSP_small
public static final double weightSP_small- See Also:
-
weightPO_small
public static final double weightPO_small- See Also:
-
weightTypeO_small
public static final double weightTypeO_small- See Also:
-
-
Constructor Details
-
StatsMatcher
public StatsMatcher() -
StatsMatcher
-
StatsMatcher
-
-
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
-
match
public double match(org.apache.jena.graph.Triple t) -
match
-
match
Return the matching weight for the first triple match found, else apply default value for fixed, unknown predicate, else return NOMATCH -
toString
-
printSSE
-