Class SimpsonIntegrator

  • All Implemented Interfaces:
    UnivariateRealIntegrator, ConvergingAlgorithm

    public class SimpsonIntegrator
    extends UnivariateRealIntegratorImpl
    Implements the Simpson's Rule for integration of real univariate functions. For reference, see Introduction to Numerical Analysis, ISBN 038795452X, chapter 3.

    This implementation employs basic trapezoid rule as building blocks to calculate the Simpson's rule of alternating 2/3 and 4/3.

    Since:
    1.2
    Version:
    $Revision: 1070725 $ $Date: 2011-02-15 02:31:12 +0100 (mar. 15 févr. 2011) $
    • Constructor Detail

      • SimpsonIntegrator

        public SimpsonIntegrator()
        Construct an integrator.
    • Method Detail

      • integrate

        @Deprecated
        public double integrate​(double min,
                                double max)
                         throws MaxIterationsExceededException,
                                FunctionEvaluationException,
                                java.lang.IllegalArgumentException
        Deprecated.
        Integrate the function in the given interval.
        Parameters:
        min - the lower bound for the interval
        max - the upper bound for the interval
        Returns:
        the value of integral
        Throws:
        FunctionEvaluationException - if an error occurs evaluating the function
        java.lang.IllegalArgumentException - if min > max or the endpoints do not satisfy the requirements specified by the integrator
        MaxIterationsExceededException
      • verifyIterationCount

        protected void verifyIterationCount()
                                     throws java.lang.IllegalArgumentException
        Verifies that the upper and lower limits of iterations are valid.
        Overrides:
        verifyIterationCount in class UnivariateRealIntegratorImpl
        Throws:
        java.lang.IllegalArgumentException - if not valid