Class BaseAbstractUnivariateIntegrator

java.lang.Object
org.apache.commons.math4.analysis.integration.BaseAbstractUnivariateIntegrator
All Implemented Interfaces:
UnivariateIntegrator
Direct Known Subclasses:
IterativeLegendreGaussIntegrator, MidPointIntegrator, RombergIntegrator, SimpsonIntegrator, TrapezoidIntegrator

public abstract class BaseAbstractUnivariateIntegrator
extends java.lang.Object
implements UnivariateIntegrator
Provide a default implementation for several generic functions.
Since:
1.2
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static double DEFAULT_ABSOLUTE_ACCURACY
    Default absolute accuracy.
    static int DEFAULT_MAX_ITERATIONS_COUNT
    Default maximal iteration count.
    static int DEFAULT_MIN_ITERATIONS_COUNT
    Default minimal iteration count.
    static double DEFAULT_RELATIVE_ACCURACY
    Default relative accuracy.
    protected Incrementor iterations
    The iteration count.
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected BaseAbstractUnivariateIntegrator​(double relativeAccuracy, double absoluteAccuracy)
    Construct an integrator with given accuracies.
    protected BaseAbstractUnivariateIntegrator​(double relativeAccuracy, double absoluteAccuracy, int minimalIterationCount, int maximalIterationCount)
    Construct an integrator with given accuracies and iteration counts.
    protected BaseAbstractUnivariateIntegrator​(int minimalIterationCount, int maximalIterationCount)
    Construct an integrator with given iteration counts.
  • Method Summary

    Modifier and Type Method Description
    protected double computeObjectiveValue​(double point)
    Compute the objective function value.
    protected abstract double doIntegrate()
    Method for implementing actual integration algorithms in derived classes.
    double getAbsoluteAccuracy()
    Get the absolute accuracy.
    int getEvaluations()
    Get the number of function evaluations of the last run of the integrator.
    int getIterations()
    Get the number of iterations of the last run of the integrator.
    protected double getMax()  
    int getMaximalIterationCount()
    Get the upper limit for the number of iterations.
    protected double getMin()  
    int getMinimalIterationCount()
    Get the min limit for the number of iterations.
    double getRelativeAccuracy()
    Get the relative accuracy.
    double integrate​(int maxEval, UnivariateFunction f, double lower, double upper)
    Integrate the function in the given interval.
    protected void setup​(int maxEval, UnivariateFunction f, double lower, double upper)
    Prepare for computation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait