Examples of LegendreGaussIntegrator


Examples of org.apache.commons.math3.analysis.integration.LegendreGaussIntegrator

            public double value(double x) {
                return weight.value(x) * p1.value(x) * p2.value(x);
            }
        };
        double dotProduct =
                new LegendreGaussIntegrator(5, 1.0e-9, 1.0e-8, 2, 15).integrate(1000000, f, a, b);
        if (p1.degree() == p2.degree()) {
            // integral should be non-zero
            Assert.assertTrue("I(" + p1.degree() + ", " + p2.degree() + ") = "+ dotProduct,
                              FastMath.abs(dotProduct) > nonZeroThreshold);
        } else {
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.