de.torstennahm.integrate.error
Class ConvergenceEstimator

java.lang.Object
  extended by de.torstennahm.integrate.error.ConvergenceEstimator
All Implemented Interfaces:
ErrorEstimator

public class ConvergenceEstimator
extends java.lang.Object
implements ErrorEstimator

Provides an estimate based on the assumption that the integral values shows logarithmic convergence. By logarithmic convergence, we mean that log(error(n))=a-b*log(n), where n is the number of function evaluations, and a and b are parameters.

Author:
Torsten Nahm

Constructor Summary
ConvergenceEstimator()
          Create the convergence estimator with a default sample factor of 1.1.
ConvergenceEstimator(double sampleFactor)
          Create the convergence estimator with the specified sample factor.
 
Method Summary
 double getEstimate()
          Returns the estimate of the integration error based on the log.
 void log(long pointsEvaluated, double currentValue)
          Logs the current integration value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvergenceEstimator

public ConvergenceEstimator()
Create the convergence estimator with a default sample factor of 1.1.

See Also:
ConvergenceEstimator(double)

ConvergenceEstimator

public ConvergenceEstimator(double sampleFactor)
Create the convergence estimator with the specified sample factor. The sample factor determines how dense the interpolation points are to be placed. A factor of f means that when an interpolation point is set a n function evaluations, the next should be at f*n evaluations, and so on.

Parameters:
sampleFactor - factor between interpolation points
Method Detail

log

public void log(long pointsEvaluated,
                double currentValue)
Description copied from interface: ErrorEstimator
Logs the current integration value.

Specified by:
log in interface ErrorEstimator
Parameters:
pointsEvaluated - number of function evaluations for this integral value
currentValue - current integral value

getEstimate

public double getEstimate()
Description copied from interface: ErrorEstimator
Returns the estimate of the integration error based on the log.

Specified by:
getEstimate in interface ErrorEstimator
Returns:
estimate of the integration error