use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_01.
@Test
public void match_01() {
StatsMatcher matcher = matcher("((:x :p ANY) 5)");
Triple t = triple("(:x :p ?v)");
double d = matcher.match(t);
assertEquals(5.0, d, 0);
}
use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_23.
@Test
public void match_23() {
StatsMatcher matcher = matcher("(:p 11)");
// No match.
Triple t = triple("(:x ?p 1913)");
double d = matcher.match(t);
assertEquals(-1, d, 0);
}
use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_08.
@Test
public void match_08() {
StatsMatcher matcher = matcher("((VAR :p LITERAL) 5)");
// No match
Triple t = triple("(?x :p ?v)");
double d = matcher.match(t);
assertEquals(-1, d, 0);
}
use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_06.
@Test
public void match_06() {
StatsMatcher matcher = matcher("((LITERAL :p VAR) 5)");
// No match
Triple t = triple("(:x :p ?v)");
double d = matcher.match(t);
assertEquals(-1, d, 0);
}
use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_02.
@Test
public void match_02() {
StatsMatcher matcher = matcher("((:x :p ANY) 5)");
// No match
Triple t = triple("(:x :q ?v)");
double d = matcher.match(t);
assertEquals(-1, d, 0);
}
Aggregations