119120121122123124125126127128129
@Test public void match_11() { StatsMatcher matcher = matcher("((VAR :p ANY) 10) ((VAR :p LITERAL) 5)") ; Triple t = triple("(?x :p 1913)") ; double d = matcher.match(t) ; assertEquals(10, d, 0) ; } // Abbreviated forms. @Test public void match_20()
128129130131132133134135136137138
// 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) ; } @Test public void match_21()
137138139140141142143144145146147
@Test public void match_21() { StatsMatcher matcher = matcher("(:p 10) ") ; Triple t = triple("(?x :p 1913)") ; double d = matcher.match(t) ; assertEquals(StatsMatcher.weightPO_small, d, 0) ; } @Test public void match_22() {
145146147148149150151152153154155
@Test public void match_22() { StatsMatcher matcher = matcher("(:p 11)") ; Triple t = triple("(:x :p 1913)") ; double d = matcher.match(t) ; assertEquals(1, d, 0) ; } @Test public void match_23() {
153154155156157158159160161162163
@Test public void match_23() { StatsMatcher matcher = matcher("(:p 11)") ; Triple t = triple("(:x ?p 1913)") ; // No match. double d = matcher.match(t) ; assertEquals(-1, d, 0) ; } @Test public void match_24() {
161162163164165166167168169170171
@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) ; } // Bounds abbreviation rules. @Test
171172173174175176177178179180181
@Test public void match_25() { StatsMatcher matcher = matcher("(:p 3) (other 1)") ; Triple t = triple("(?x :p ?v)") ; double d = matcher.match(t) ; assertEquals(3, d, 0) ; } @Test public void match_26()
180181182183184185186187188189190
@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) ; } // Bounds abbreviation rules. @Test public void match_27()
189190191192193194195196197198199
// 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) ; } @Test public void reorderIndexes1() {
3839404142434445464748
@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) ; } @Test public void match_02() {