de.torstennahm.integrate.error
Class SimpleEstimator

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

public class SimpleEstimator
extends java.lang.Object
implements ErrorEstimator

Provides a very simple estimate of the integration error. The estimate given is the absolute difference between the integral value at n/2 and n function evaluations, where n increases with new log entries.

Author:
Torsten Nahm

Constructor Summary
SimpleEstimator()
           
 
Method Summary
 double getEstimate()
          Returns the estimate of the integration error based on the log.
 void log(long pointsEvaluated, double currentResult)
          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

SimpleEstimator

public SimpleEstimator()
Method Detail

log

public void log(long pointsEvaluated,
                double currentResult)
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
currentResult - 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