Examples of mapFunction()


Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
        assertEquals("(Math.exp(2))" , ctx.mapFunction("exp","2"));
        assertEquals("(Math.pow(2,3))" , ctx.mapFunction("pow","2","3"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
        assertEquals("(Math.exp(2))" , ctx.mapFunction("exp","2"));
        assertEquals("(Math.pow(2,3))" , ctx.mapFunction("pow","2","3"));
        assertEquals("(1)" , ctx.mapFunction("pow","0","0"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
        assertEquals("(Math.exp(2))" , ctx.mapFunction("exp","2"));
        assertEquals("(Math.pow(2,3))" , ctx.mapFunction("pow","2","3"));
        assertEquals("(1)" , ctx.mapFunction("pow","0","0"));
        assertEquals("(2 > 3 ? 1 : 0)" , ctx.mapFunction("threshold","2","3"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
        assertEquals("(Math.exp(2))" , ctx.mapFunction("exp","2"));
        assertEquals("(Math.pow(2,3))" , ctx.mapFunction("pow","2","3"));
        assertEquals("(1)" , ctx.mapFunction("pow","0","0"));
        assertEquals("(2 > 3 ? 1 : 0)" , ctx.mapFunction("threshold","2","3"));
        assertEquals("(Math.floor(2))" , ctx.mapFunction("floor","2"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
        assertEquals("(Math.exp(2))" , ctx.mapFunction("exp","2"));
        assertEquals("(Math.pow(2,3))" , ctx.mapFunction("pow","2","3"));
        assertEquals("(1)" , ctx.mapFunction("pow","0","0"));
        assertEquals("(2 > 3 ? 1 : 0)" , ctx.mapFunction("threshold","2","3"));
        assertEquals("(Math.floor(2))" , ctx.mapFunction("floor","2"));
        assertEquals("(Math.ceil(2))" , ctx.mapFunction("ceil","2"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
        assertEquals("(Math.exp(2))" , ctx.mapFunction("exp","2"));
        assertEquals("(Math.pow(2,3))" , ctx.mapFunction("pow","2","3"));
        assertEquals("(1)" , ctx.mapFunction("pow","0","0"));
        assertEquals("(2 > 3 ? 1 : 0)" , ctx.mapFunction("threshold","2","3"));
        assertEquals("(Math.floor(2))" , ctx.mapFunction("floor","2"));
        assertEquals("(Math.ceil(2))" , ctx.mapFunction("ceil","2"));
        assertEquals("(Math.round(2))" , ctx.mapFunction("round","2"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
        assertEquals("(Math.exp(2))" , ctx.mapFunction("exp","2"));
        assertEquals("(Math.pow(2,3))" , ctx.mapFunction("pow","2","3"));
        assertEquals("(1)" , ctx.mapFunction("pow","0","0"));
        assertEquals("(2 > 3 ? 1 : 0)" , ctx.mapFunction("threshold","2","3"));
        assertEquals("(Math.floor(2))" , ctx.mapFunction("floor","2"));
        assertEquals("(Math.ceil(2))" , ctx.mapFunction("ceil","2"));
        assertEquals("(Math.round(2))" , ctx.mapFunction("round","2"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(Math.sqrt(2))" , ctx.mapFunction("sqrt","2"));
        assertEquals("(Math.abs(2))" , ctx.mapFunction("abs","2"));
        assertEquals("(Math.exp(2))" , ctx.mapFunction("exp","2"));
        assertEquals("(Math.pow(2,3))" , ctx.mapFunction("pow","2","3"));
        assertEquals("(1)" , ctx.mapFunction("pow","0","0"));
        assertEquals("(2 > 3 ? 1 : 0)" , ctx.mapFunction("threshold","2","3"));
        assertEquals("(Math.floor(2))" , ctx.mapFunction("floor","2"));
        assertEquals("(Math.ceil(2))" , ctx.mapFunction("ceil","2"));
        assertEquals("(Math.round(2))" , ctx.mapFunction("round","2"));

        assertEquals("(\"abc\".toString().toUpperCase())" , ctx.mapFunction("uppercase","\"abc\""));
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.