use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_24.
@Test
public void match_24() {
StatsMatcher matcher = matcher("(:p 11) (TERM 12)");
Triple t = triple("(?x :q ?v)");
double d = matcher.match(t);
assertEquals(12, d, 0);
}
use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_10.
// Test first match wins.
@Test
public void match_10() {
StatsMatcher matcher = matcher("((VAR :p LITERAL) 5) ((VAR :p ANY) 10)");
Triple t = triple("(?x :p 1913)");
double d = matcher.match(t);
assertEquals(5, d, 0);
}
use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_20.
// Abbreviated forms.
@Test
public void match_20() {
StatsMatcher matcher = matcher("(:p 10) ");
Triple t = triple("(?x :p ?v)");
double d = matcher.match(t);
assertEquals(10, d, 0);
}
use of org.apache.jena.sparql.engine.optimizer.StatsMatcher in project jena by apache.
the class TestReorder method match_26.
@Test
public void match_26() {
StatsMatcher matcher = matcher("(:pp 3) (other 1)");
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_27.
// Bounds abbreviation rules.
@Test
public void match_27() {
StatsMatcher matcher = matcher("(:p 200) (TERM 2)");
Triple t = triple("(?x :q :v)");
double d = matcher.match(t);
assertEquals(2, d, 0);
}
Aggregations