Class UnivariateRealIntegratorImpl
- java.lang.Object
-
- org.apache.commons.math.ConvergingAlgorithmImpl
-
- org.apache.commons.math.analysis.integration.UnivariateRealIntegratorImpl
-
- All Implemented Interfaces:
UnivariateRealIntegrator
,ConvergingAlgorithm
- Direct Known Subclasses:
LegendreGaussIntegrator
,RombergIntegrator
,SimpsonIntegrator
,TrapezoidIntegrator
public abstract class UnivariateRealIntegratorImpl extends ConvergingAlgorithmImpl implements UnivariateRealIntegrator
Provide a default implementation for several generic functions.- Since:
- 1.2
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMinimalIterationCount()
Get the lower limit for the number of iterations.double
getResult()
Access the last computed integral.void
resetMinimalIterationCount()
Reset the lower limit for the number of iterations to the default.void
setMinimalIterationCount(int count)
Set the lower limit for the number of iterations.-
Methods inherited from class org.apache.commons.math.ConvergingAlgorithmImpl
getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, resetAbsoluteAccuracy, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy
-
Methods inherited from class java.lang.Object
equals, 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
-
Methods inherited from interface org.apache.commons.math.analysis.integration.UnivariateRealIntegrator
integrate, integrate
-
-
-
-
Method Detail
-
getResult
public double getResult() throws java.lang.IllegalStateException
Access the last computed integral.- Specified by:
getResult
in interfaceUnivariateRealIntegrator
- Returns:
- the last computed integral
- Throws:
java.lang.IllegalStateException
- if no integral has been computed
-
setMinimalIterationCount
public void setMinimalIterationCount(int count)
Set the lower limit for the number of iterations.Minimal iteration is needed to avoid false early convergence, e.g. the sample points happen to be zeroes of the function. Users can use the default value or choose one that they see as appropriate.
A
ConvergenceException
will be thrown if this number is not met.- Specified by:
setMinimalIterationCount
in interfaceUnivariateRealIntegrator
- Parameters:
count
- minimum number of iterations
-
getMinimalIterationCount
public int getMinimalIterationCount()
Get the lower limit for the number of iterations.- Specified by:
getMinimalIterationCount
in interfaceUnivariateRealIntegrator
- Returns:
- the actual lower limit
-
resetMinimalIterationCount
public void resetMinimalIterationCount()
Reset the lower limit for the number of iterations to the default.The default value is supplied by the implementation.
- Specified by:
resetMinimalIterationCount
in interfaceUnivariateRealIntegrator
- See Also:
UnivariateRealIntegrator.setMinimalIterationCount(int)
-
-