Documentation of 'org.apache.commons.math3.analysis.integration.gauss.SymmetricGaussIntegrator' Java class
SymmetricGaussIntegrator
org.apache.commons.math3.analysis.integration.gauss

Class SymmetricGaussIntegrator



  • public class SymmetricGaussIntegrator
    extends GaussIntegrator
    This class's implements integrate method assuming that the integral is symmetric about 0. This allows to reduce numerical errors.
    Since:
    3.3
    • Constructor Summary

      Constructors 
      Constructor and Description
      SymmetricGaussIntegrator(double[] points, double[] weights)
      Creates an integrator from the given points and weights.
      SymmetricGaussIntegrator(Pair<double[],double[]> pointsAndWeights)
      Creates an integrator from the given pair of points (first element of the pair) and weights (second element of the pair.
    • Constructor Detail

      • SymmetricGaussIntegrator

        public SymmetricGaussIntegrator(double[] points,
                                        double[] weights)
                                 throws NonMonotonicSequenceException,
                                        DimensionMismatchException
        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.
        Parameters:
        points - Integration points.
        weights - Weights of the corresponding integration nodes.
        Throws:
        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.
        Overrides:
        integrate in class GaussIntegrator
        Parameters:
        f - Function to integrate.
        Returns:
        the integral of the weighted function.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.