net.sf.doodleproject.numerics4j.integration
Class TrapezoidalIntegrator.IterativeState

java.lang.Object
  extended by net.sf.doodleproject.numerics4j.integration.TrapezoidalIntegrator.IterativeState
Enclosing class:
TrapezoidalIntegrator

static class TrapezoidalIntegrator.IterativeState
extends java.lang.Object

The internal state used during root finding.


Constructor Summary
TrapezoidalIntegrator.IterativeState(Function f, double low, double up)
          Create a state object for the given initial root approximation.
 
Method Summary
 int getIterations()
          Access the current iteration.
 double getResult()
          Access the result of this root finding.
 void iterate()
          Perform the next iteration of finding a root.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrapezoidalIntegrator.IterativeState

TrapezoidalIntegrator.IterativeState(Function f,
                                     double low,
                                     double up)
                               throws NumericException
Create a state object for the given initial root approximation.

Parameters:
f - the target function.
low - the lower limit of integration.
up - the upper limit of integration.
Throws:
NumericException - if function cannot be evaluated at the limits of integration.
Method Detail

getIterations

public int getIterations()
Access the current iteration.

Returns:
the current iteration.

iterate

public void iterate()
             throws NumericException
Perform the next iteration of finding a root. The current state is updated with the newly compuated root data.

Throws:
NumericException - if the function could not be evaluated.

getResult

public double getResult()
Access the result of this root finding.

Returns:
the root.


Copyright 2004-2004-2007 DoodleProject. All Rights Reserved.