Examples of StatsMatcher


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

        assertEquals(5, d, 0) ;
    }
   
    @Test public void match_05()
    {
        StatsMatcher matcher = matcher("((URI :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_06()
    {
        StatsMatcher matcher = matcher("((LITERAL :p VAR) 5)") ;
        Triple t = triple("(:x :p ?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_07()
    {
        StatsMatcher matcher = matcher("((BNODE :p VAR) 5)") ;
        Triple t = triple("(_:a :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_08()
    {
        StatsMatcher matcher = matcher("((VAR :p LITERAL) 5)") ;
        Triple t = triple("(?x :p ?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_09()
    {
        StatsMatcher matcher = matcher("((VAR :p LITERAL) 5)") ;
        Triple t = triple("(?x :p 1913)") ;
        double d = matcher.match(t) ;
        assertEquals(5, d, 0) ;
    }
View Full Code Here

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

    }

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

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

        assertEquals(5, d, 0) ;
    }

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

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

    }

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

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

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

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

        assertEquals(StatsMatcher.weightPO_small, d, 0) ;
    }
   
    @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) ;
    }
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.