public class MinimizerBasedRootFinder extends AnytimeAlgorithmWrapper<InputOutputPair<java.lang.Double,java.lang.Double>,LineMinimizer<Evaluator<java.lang.Double,java.lang.Double>>> implements RootFinder
DEFAULT_ITERATION, iteration
Constructor and Description |
---|
MinimizerBasedRootFinder()
Creates a new instance of MinimizerBasedRootFinder
|
MinimizerBasedRootFinder(LineMinimizer<Evaluator<java.lang.Double,java.lang.Double>> algorithm)
Creates a new instance of MinimizerBasedRootFinder
|
Modifier and Type | Method and Description |
---|---|
double |
getInitialGuess()
Sets the initial guess of the root (zero-crossing), which is supplied
as input to the function to find the zero-crossings of.
|
InputOutputPair<java.lang.Double,java.lang.Double> |
getResult()
Gets the current result of the algorithm.
|
double |
getTolerance()
Gets the tolerance of the algorithm.
|
InputOutputPair<java.lang.Double,java.lang.Double> |
learn(Evaluator<java.lang.Double,java.lang.Double> data)
The
learn method creates an object of ResultType using
data of type DataType , using some form of "learning" algorithm. |
void |
setInitialGuess(double intitialGuess)
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.
|
algorithmEnded, algorithmStarted, clone, getAlgorithm, getIteration, getMaxIterations, isResultValid, readResolve, setAlgorithm, setMaxIterations, stepEnded, stepStarted, stop
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
getMaxIterations, setMaxIterations
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
isResultValid, stop
public MinimizerBasedRootFinder()
public MinimizerBasedRootFinder(LineMinimizer<Evaluator<java.lang.Double,java.lang.Double>> algorithm)
algorithm
- Minimization algorithm.public InputOutputPair<java.lang.Double,java.lang.Double> getResult()
AnytimeAlgorithm
getResult
in interface AnytimeAlgorithm<InputOutputPair<java.lang.Double,java.lang.Double>>
public double getInitialGuess()
RootFinder
getInitialGuess
in interface RootFinder
public void setInitialGuess(double intitialGuess)
RootFinder
setInitialGuess
in interface RootFinder
intitialGuess
- Initial guess of the root location.public void setTolerance(double tolerance)
RootFinder
setTolerance
in interface RootFinder
tolerance
- 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 getTolerance()
RootFinder
getTolerance
in interface RootFinder
public InputOutputPair<java.lang.Double,java.lang.Double> learn(Evaluator<java.lang.Double,java.lang.Double> data)
BatchLearner
learn
method creates an object of ResultType
using
data of type DataType
, using some form of "learning" algorithm.learn
in interface BatchLearner<Evaluator<java.lang.Double,java.lang.Double>,InputOutputPair<java.lang.Double,java.lang.Double>>
data
- The data that the learning algorithm will use to create an
object of ResultType
.