q1471341.mp1074.integration
Class Integrator
java.lang.Object
q1471341.mp1074.integration.Integrator
- Direct Known Subclasses:
- LatticeIntegrator, MonteCarloIntegrator
- public abstract class Integrator
- extends java.lang.Object
The abstract root class of the integrator hierarchy.
The subclasses implement specific algorithms for numerical integration.
The integration is always performed over the unit cube [0,1]^s,
where s is the dimension of the integrand.
Only the abstract method integrate
needs to be implemented
by subclasses. In the integrate
method, subclasses should
continually refine the result of the integration. Regularly the method
shouldTerminate
should be called, which checks whether one
or more of the termination conditions is met.
Currently 4 termination conditions are implemented:
- absolute tolerance - integration stops if two successive integration
results differ from each other no more than the specified absolute tolerance,
- relative tolerance - integration stops if two successive integration
results differ from each other no more than the specified relative tolerance,
- evaluation count limit - integration stops if the integrand was evaluated
more often than the specified evaluation count limit,
- evaluation time limit - integration stops if more time elapsed since the
start of the integration than the specified evaluation time limit.
The final result of the integration process is returned in an
IntegrationResult
instance.
- Author:
- Ulrich Telle
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TC_ABSOLUTE_TOLERANCE
public final int TC_ABSOLUTE_TOLERANCE
- Termination condition constants
- See Also:
- Constant Field Values
TC_RELATIVE_TOLERANCE
public final int TC_RELATIVE_TOLERANCE
- See Also:
- Constant Field Values
TC_EVALUATION_COUNT
public final int TC_EVALUATION_COUNT
- See Also:
- Constant Field Values
TC_EVALUATION_TIME
public final int TC_EVALUATION_TIME
- See Also:
- Constant Field Values
integrate
public abstract IntegrationResult integrate(Integrand function)
throws IntegrationException
- Performs numerical integration of the function until one of the
termination conditions is met.
- Parameters:
function
- integrand function
- Returns:
- result of integration
- Throws:
IntegrationException
- if an integration error occurs
getAbsoluteTolerance
public double getAbsoluteTolerance()
- Returns:
- Returns the absoluteTolerance.
setAbsoluteTolerance
public void setAbsoluteTolerance(double absoluteTolerance)
- Parameters:
absoluteTolerance
- The absoluteTolerance to set.
getEvaluationCountLimit
public long getEvaluationCountLimit()
- Returns:
- Returns the evaluationCountLimit.
setEvaluationCountLimit
public void setEvaluationCountLimit(long evaluationCountLimit)
- Parameters:
evaluationCountLimit
- The evaluationCountLimit to set.
getRelativeTolerance
public double getRelativeTolerance()
- Returns:
- Returns the relativeTolerance.
setRelativeTolerance
public void setRelativeTolerance(double relativeTolerance)
- Parameters:
relativeTolerance
- The relativeTolerance to set.
getTerminationCondition
public int getTerminationCondition()
- Returns:
- Returns the terminationCondition.
getEvaluationTime
public long getEvaluationTime()
- Returns:
- Returns the evaluationTime.