Package org.opengis.filter.expression

Examples of org.opengis.filter.expression.Function.evaluate()


            if (Double.isNaN(good3)) {
                assertTrue("floor of (-2.0):", Double.isNaN(((Double) floorFunction
                        .evaluate(null)).doubleValue()));
            } else {
                assertEquals("floor of (-2.0):", (double) Math.floor(-2.0),
                        ((Double) floorFunction.evaluate(null)).doubleValue(),
                        0.00001);
            }
           
            floorFunction = ff.function("floor", literal_pi);
            double good4 = Math.floor(Math.PI);
View Full Code Here


           
            floorFunction = ff.function("floor", literal_pi);
            double good4 = Math.floor(Math.PI);
            if (Double.isNaN(good4)) {
                assertTrue("floor of (3.141592653589793):", Double
                        .isNaN(((Double) floorFunction.evaluate(null))
                                .doubleValue()));
            } else {
                assertEquals("floor of (3.141592653589793):", (double) Math
                        .floor(3.141592653589793), ((Double) floorFunction
                        .evaluate(null)).doubleValue(), 0.00001);
View Full Code Here

                assertTrue("floor of (3.141592653589793):", Double
                        .isNaN(((Double) floorFunction.evaluate(null))
                                .doubleValue()));
            } else {
                assertEquals("floor of (3.141592653589793):", (double) Math
                        .floor(3.141592653589793), ((Double) floorFunction
                        .evaluate(null)).doubleValue(), 0.00001);
            }
           
            floorFunction = ff.function("floor", literal_05pi);
            double good5 = Math.floor(1.5707963267948966);
View Full Code Here

           
            floorFunction = ff.function("floor", literal_05pi);
            double good5 = Math.floor(1.5707963267948966);
            if (Double.isNaN(good5)) {
                assertTrue("floor of (1.5707963267948966):", Double
                        .isNaN(((Double) floorFunction.evaluate(null))
                                .doubleValue()));
            } else {
                assertEquals("floor of (1.5707963267948966):", (double) Math
                        .floor(1.5707963267948966), ((Double) floorFunction
                        .evaluate(null)).doubleValue(), 0.00001);
View Full Code Here

                assertTrue("floor of (1.5707963267948966):", Double
                        .isNaN(((Double) floorFunction.evaluate(null))
                                .doubleValue()));
            } else {
                assertEquals("floor of (1.5707963267948966):", (double) Math
                        .floor(1.5707963267948966), ((Double) floorFunction
                        .evaluate(null)).doubleValue(), 0.00001);
            }
        } catch (FactoryRegistryException e) {
            e.printStackTrace();
            fail("Unexpected exception: " + e.getMessage());
View Full Code Here

            assertEquals("Number of arguments, ", 1, log.getFunctionName().getArgumentCount());

            Function logFunction = ff.function("log", literal_1);
            double good0 = Math.log(1.0);
            if (Double.isNaN(good0)) {
                assertTrue("log of (1.0):", Double.isNaN(((Double) logFunction
                        .evaluate(null)).doubleValue()));
            } else {
                assertEquals("log of (1.0):", (double) Math.log(1.0),
                        ((Double) logFunction.evaluate(null)).doubleValue(),
                        0.00001);
View Full Code Here

            if (Double.isNaN(good0)) {
                assertTrue("log of (1.0):", Double.isNaN(((Double) logFunction
                        .evaluate(null)).doubleValue()));
            } else {
                assertEquals("log of (1.0):", (double) Math.log(1.0),
                        ((Double) logFunction.evaluate(null)).doubleValue(),
                        0.00001);
            }
           
            logFunction = ff.function("log", literal_m1);
            double good1 = Math.log(-1.0);
View Full Code Here

            }
           
            logFunction = ff.function("log", literal_m1);
            double good1 = Math.log(-1.0);
            if (Double.isNaN(good1)) {
                assertTrue("log of (-1.0):", Double.isNaN(((Double) logFunction
                        .evaluate(null)).doubleValue()));
            } else {
                assertEquals("log of (-1.0):", (double) Math.log(-1.0),
                        ((Double) logFunction.evaluate(null)).doubleValue(),
                        0.00001);
View Full Code Here

            if (Double.isNaN(good1)) {
                assertTrue("log of (-1.0):", Double.isNaN(((Double) logFunction
                        .evaluate(null)).doubleValue()));
            } else {
                assertEquals("log of (-1.0):", (double) Math.log(-1.0),
                        ((Double) logFunction.evaluate(null)).doubleValue(),
                        0.00001);
            }
           
            logFunction = ff.function("log", literal_2);
            double good2 = Math.log(2.0);
View Full Code Here

            }
           
            logFunction = ff.function("log", literal_2);
            double good2 = Math.log(2.0);
            if (Double.isNaN(good2)) {
                assertTrue("log of (2.0):", Double.isNaN(((Double) logFunction
                        .evaluate(null)).doubleValue()));
            } else {
                assertEquals("log of (2.0):", (double) Math.log(2.0),
                        ((Double) logFunction.evaluate(null)).doubleValue(),
                        0.00001);
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.