public abstract class AbstractRootFinder extends AbstractAnytimeBatchLearner<Evaluator<java.lang.Double,java.lang.Double>,InputOutputPair<java.lang.Double,java.lang.Double>> implements RootFinder, MeasurablePerformanceAlgorithm
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_ITERATIONS
Default maximum number of iterations, 1000.
|
static double |
DEFAULT_TOLERANCE
Default tolerance of the algorithm, 1.0E-5.
|
data, keepGoingmaxIterationsDEFAULT_ITERATION, iteration| Constructor and Description |
|---|
AbstractRootFinder()
Creates a new instance of AbstractRootFinder
|
| Modifier and Type | Method and Description |
|---|---|
AbstractRootFinder |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
double |
getInitialGuess()
Returns the initial guess of the root.
|
NamedValue<java.lang.Double> |
getPerformance()
Gets the name-value pair that describes the current performance of the
algorithm.
|
double |
getTolerance()
Gets the tolerance of the algorithm.
|
void |
setInitialGuess(double initialGuess)
Sets the initial guess of the root (zero-crossing), which is supplied
as input to the function to find the zero-crossings of.
|
void |
setTolerance(double tolerance)
Sets the tolerance of the algorithm.
|
cleanupAlgorithm, getData, getKeepGoing, initializeAlgorithm, learn, setData, setKeepGoing, step, stopgetMaxIterations, isResultValid, setMaxIterationsaddIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListenersequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlearngetMaxIterations, getResult, setMaxIterationsaddIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListenerisResultValid, stoppublic static final double DEFAULT_TOLERANCE
public static final int DEFAULT_MAX_ITERATIONS
public AbstractRootFinder()
public AbstractRootFinder clone()
AbstractCloneableSerializableObject class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone() to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone() as the basis for your implementation.clone in interface CloneableSerializableclone in class AbstractAnytimeBatchLearner<Evaluator<java.lang.Double,java.lang.Double>,InputOutputPair<java.lang.Double,java.lang.Double>>public double getTolerance()
RootFindergetTolerance in interface RootFinderpublic void setTolerance(double tolerance)
RootFindersetTolerance in interface RootFindertolerance - Tolerance, where tolerances closer to zero are more accurate, and larger
tolerances are less accurate. In any case, tolerance must be greater
than or equal to zero.public double getInitialGuess()
getInitialGuess in interface RootFinderpublic void setInitialGuess(double initialGuess)
RootFindersetInitialGuess in interface RootFinderinitialGuess - Initial guess of the root location.public NamedValue<java.lang.Double> getPerformance()
MeasurablePerformanceAlgorithmgetPerformance in interface MeasurablePerformanceAlgorithm