public class RootBracketExpander extends AbstractAnytimeBatchLearner<Evaluator<java.lang.Double,java.lang.Double>,LineBracket> implements RootBracketer
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_INITIAL_GUESS
Default initial guess, 0.0
|
static int |
DEFAULT_MAX_ITERATIONS
Default max iterations, 100
|
static double |
SCALE_FACTOR
Default scale factor on expansion, the golden ratio, 1.618034
|
data, keepGoingmaxIterationsDEFAULT_ITERATION, iteration| Constructor and Description |
|---|
RootBracketExpander()
Creates a new instance of RootBracketExpander
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupAlgorithm()
Called to clean up the learning algorithm's state after learning has
finished.
|
LineBracket |
getBracket()
Getter for bracket.
|
double |
getInitialGuess()
Getter for initialGuess.
|
LineBracket |
getResult()
Gets the current result of the algorithm.
|
protected boolean |
initializeAlgorithm()
Called to initialize the learning algorithm's state based on the
data that is stored in the data field.
|
boolean |
isResultValid()
Indicates whether or not the algorithm results are in a consistent state
or not.
|
protected void |
setBracket(LineBracket bracket)
Setter for bracket.
|
void |
setInitialGuess(double initialGuess)
Sets the initial guess of the root location.
|
protected boolean |
step()
Called to take a single step of the learning algorithm.
|
clone, getData, getKeepGoing, learn, setData, setKeepGoing, stopgetMaxIterations, setMaxIterationsaddIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListenersequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlearnclonegetMaxIterations, setMaxIterationsaddIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListenerstoppublic static final double SCALE_FACTOR
public static final int DEFAULT_MAX_ITERATIONS
public static final double DEFAULT_INITIAL_GUESS
public RootBracketExpander()
protected boolean initializeAlgorithm()
AbstractAnytimeBatchLearnerinitializeAlgorithm in class AbstractAnytimeBatchLearner<Evaluator<java.lang.Double,java.lang.Double>,LineBracket>protected boolean step()
AbstractAnytimeBatchLearnerstep in class AbstractAnytimeBatchLearner<Evaluator<java.lang.Double,java.lang.Double>,LineBracket>protected void cleanupAlgorithm()
AbstractAnytimeBatchLearnercleanupAlgorithm in class AbstractAnytimeBatchLearner<Evaluator<java.lang.Double,java.lang.Double>,LineBracket>public LineBracket getResult()
AnytimeAlgorithmgetResult in interface AnytimeAlgorithm<LineBracket>public boolean isResultValid()
StoppableAlgorithmStoppableAlgorithm may not always be able to stop in a
manner that makes its results valid. This method is used to check whether
the results are in a consistent state or not.isResultValid in interface StoppableAlgorithmisResultValid in class AbstractAnytimeAlgorithm<LineBracket>public double getInitialGuess()
public void setInitialGuess(double initialGuess)
RootBracketersetInitialGuess in interface RootBracketerinitialGuess - Initial guess of the root location.public LineBracket getBracket()
protected void setBracket(LineBracket bracket)
bracket - Bracket on the root location.