Class SymmetricGaussIntegrator

    • Constructor Detail

      • SymmetricGaussIntegrator

        public SymmetricGaussIntegrator​(double[] points,
                                        double[] weights)
        Creates an integrator from the given points and weights. The integration interval is defined by the first and last value of points which must be sorted in increasing order.
        points - Integration points.
        weights - Weights of the corresponding integration nodes.
        NonMonotonicSequenceException - if the points are not sorted in increasing order.
        DimensionMismatchException - if points and weights don't have the same length
    • Method Detail

      • integrate

        public double integrate​(UnivariateFunction f)
        Returns an estimate of the integral of f(x) * w(x), where w is a weight function that depends on the actual flavor of the Gauss integration scheme. The algorithm uses the points and associated weights, as passed to the constructor.
        integrate in class GaussIntegrator
        f - Function to integrate.
        the integral of the weighted function.