Examples of StatsMatcher


Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

        assertEquals(-1, d, 0) ;
    }

    @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) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

   
    // Bounds abbreviation rules.
    @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) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

    }
   
    @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) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

    }

    // 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) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

        assertEquals(bgp2, bgp3) ;
    }
   
    @Test public void stats_01()
    {
        StatsMatcher m = matcher("((:x :p ANY) 5)") ;
        ReorderTransformation transform = new ReorderWeighted(m) ;
        BasicPattern bgp = bgp("(bgp)") ;
        BasicPattern bgp2 = transform.reorder(bgp) ;
        assertEquals(bgp2, bgp) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

        String s2 = "))" ;
       
        String x = StrUtils.strjoinNL(str) ;
       
        Item item = SSE.parse(s1+x+s2) ;
        return new StatsMatcher(item) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

public class TestReorder extends BaseTest
{

    @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) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

        assertEquals(5.0, d, 0) ;
    }
   
    @Test public void match_02()
    {
        StatsMatcher matcher = matcher("((:x :p ANY) 5)") ;
        Triple t = triple("(:x :q ?v)") ;   // No match
        double d = matcher.match(t) ;
        assertEquals(-1, d, 0) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

        assertEquals(-1, d, 0) ;
    }
   
    @Test public void match_03()
    {
        StatsMatcher matcher = matcher("((:x :p VAR) 5)") ;
        Triple t = triple("(:x :p ?v)") ;
        double d = matcher.match(t) ;
        assertEquals(5, d, 0) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.optimizer.StatsMatcher

        assertEquals(5, d, 0) ;
    }
   
    @Test public void match_04()
    {
        StatsMatcher matcher = matcher("((TERM :p VAR) 5)") ;
        Triple t = triple("(:x :p ?v)") ;
        double d = matcher.match(t) ;
        assertEquals(5, d, 0) ;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.