q1471341.mp1074.integration
Class Integrator

java.lang.Object
  extended byq1471341.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:

The final result of the integration process is returned in an IntegrationResult instance.

Author:
Ulrich Telle

Field Summary
 int TC_ABSOLUTE_TOLERANCE
          Termination condition constants
 int TC_EVALUATION_COUNT
           
 int TC_EVALUATION_TIME
           
 int TC_RELATIVE_TOLERANCE
           
 
Method Summary
 double getAbsoluteTolerance()
           
 long getEvaluationCountLimit()
           
 long getEvaluationTime()
           
 double getRelativeTolerance()
           
 int getTerminationCondition()
           
abstract  IntegrationResult integrate(Integrand function)
          Performs numerical integration of the function until one of the termination conditions is met.
 void setAbsoluteTolerance(double absoluteTolerance)
           
 void setEvaluationCountLimit(long evaluationCountLimit)
           
 void setRelativeTolerance(double relativeTolerance)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Method Detail

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.