|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.ConvergingAlgorithmImpl
org.apache.commons.math.analysis.integration.UnivariateRealIntegratorImpl
org.apache.commons.math.analysis.integration.TrapezoidIntegrator
public class TrapezoidIntegrator
Implements the Trapezoidal Rule for integration of real univariate functions. For reference, see Introduction to Numerical Analysis, ISBN 038795452X, chapter 3.
The function should be integrable.
Field Summary |
---|
Fields inherited from class org.apache.commons.math.analysis.integration.UnivariateRealIntegratorImpl |
---|
defaultMinimalIterationCount, f, minimalIterationCount, result, resultComputed |
Fields inherited from class org.apache.commons.math.ConvergingAlgorithmImpl |
---|
absoluteAccuracy, defaultAbsoluteAccuracy, defaultMaximalIterationCount, defaultRelativeAccuracy, iterationCount, maximalIterationCount, relativeAccuracy |
Constructor Summary | |
---|---|
TrapezoidIntegrator()
Construct an integrator. |
|
TrapezoidIntegrator(UnivariateRealFunction f)
Deprecated. as of 2.0 the integrand function is passed as an argument to the integrate(UnivariateRealFunction, double, double) method. |
Method Summary | |
---|---|
double |
integrate(double min,
double max)
Deprecated. |
double |
integrate(UnivariateRealFunction f,
double min,
double max)
Integrate the function in the given interval. |
protected void |
verifyIterationCount()
Verifies that the upper and lower limits of iterations are valid. |
Methods inherited from class org.apache.commons.math.analysis.integration.UnivariateRealIntegratorImpl |
---|
clearResult, getMinimalIterationCount, getResult, resetMinimalIterationCount, setMinimalIterationCount, setResult, verifyInterval |
Methods inherited from class org.apache.commons.math.ConvergingAlgorithmImpl |
---|
getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, incrementIterationsCounter, resetAbsoluteAccuracy, resetIterationsCounter, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.math.ConvergingAlgorithm |
---|
getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, resetAbsoluteAccuracy, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy |
Constructor Detail |
---|
@Deprecated public TrapezoidIntegrator(UnivariateRealFunction f)
integrate(UnivariateRealFunction, double, double)
method.
f
- function to integratepublic TrapezoidIntegrator()
Method Detail |
---|
@Deprecated public double integrate(double min, double max) throws MaxIterationsExceededException, FunctionEvaluationException, IllegalArgumentException
min
- the lower bound for the intervalmax
- the upper bound for the interval
FunctionEvaluationException
- if an error occurs evaluating the
function
IllegalArgumentException
- if min > max or the endpoints do not
satisfy the requirements specified by the integrator
MaxIterationsExceededException
public double integrate(UnivariateRealFunction f, double min, double max) throws MaxIterationsExceededException, FunctionEvaluationException, IllegalArgumentException
f
- the integrand functionmin
- the lower bound for the intervalmax
- the upper bound for the interval
FunctionEvaluationException
- if an error occurs evaluating the function
IllegalArgumentException
- if min > max or the endpoints do not
satisfy the requirements specified by the integrator
MaxIterationsExceededException
protected void verifyIterationCount() throws IllegalArgumentException
verifyIterationCount
in class UnivariateRealIntegratorImpl
IllegalArgumentException
- if not valid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |