Class MultiOptimizer
java.lang.Object
com.irurueta.numerical.optimization.Optimizer
com.irurueta.numerical.optimization.MultiOptimizer
- Direct Known Subclasses:
DerivativeLineMultiOptimizer
,LineMultiOptimizer
,QuasiNewtonMultiOptimizer
,SimplexMultiOptimizer
Abstract class to search for minima on multidimensional classes.
A multidimensional class is one having several input parameters (usually
provided as an array of values), and returning a single scalar value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double
Function value at estimated minimum.protected MultiDimensionFunctionEvaluatorListener
Listener to evaluate a multidimensional function.protected boolean
Boolean indicating whether a minimum has already been found or not.protected double[]
Minimum that was estimated.Fields inherited from class com.irurueta.numerical.optimization.Optimizer
iterationCompletedListener, locked
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Empty constructor.protected
Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns function evaluation at estimated minimum point.Returns listener to evaluate a multidimensional functiondouble[]
Returns minimum point that was found.boolean
Returns boolean indicating whether listener has been provided and is available for retrieval.boolean
isReady()
Returns boolean indicating whether this instance is ready to start the estimation of a minimum.boolean
Returns boolean indicating whether a minimum has been estimated and is available for retrieval.void
Sets listener to evaluate a multidimensional function.Methods inherited from class com.irurueta.numerical.optimization.Optimizer
getOnIterationCompletedListener, isLocked, minimize, setOnIterationCompletedListener
-
Field Details
-
listener
Listener to evaluate a multidimensional function. -
xmin
protected double[] xminMinimum that was estimated. -
fmin
protected double fminFunction value at estimated minimum. -
resultAvailable
protected boolean resultAvailableBoolean indicating whether a minimum has already been found or not.
-
-
Constructor Details
-
MultiOptimizer
protected MultiOptimizer()Empty constructor. -
MultiOptimizer
Constructor.- Parameters:
listener
- Listener to evaluate a multidimensional function.
-
-
Method Details
-
getListener
Returns listener to evaluate a multidimensional function- Returns:
- Listener to evaluate a multidimensional function.
- Throws:
NotAvailableException
- Raised if listener has not yet been provided and is not available for retrieval.
-
setListener
Sets listener to evaluate a multidimensional function.- Parameters:
listener
- Listener to evaluate a multidimensional function.- Throws:
LockedException
- Raised if this instance is locked.
-
isListenerAvailable
public boolean isListenerAvailable()Returns boolean indicating whether listener has been provided and is available for retrieval.- Returns:
- True if available, false otherwise.
-
isReady
public boolean isReady()Returns boolean indicating whether this instance is ready to start the estimation of a minimum. Because this class is abstract, this method is meant to be overridden, otherwise false will always be returned. -
isResultAvailable
public boolean isResultAvailable()Returns boolean indicating whether a minimum has been estimated and is available for retrieval.- Returns:
- True if result is available, false otherwise.
-
getResult
Returns minimum point that was found.- Returns:
- Minimum point
- Throws:
NotAvailableException
- Raised if a minimum is not yet available for retrieval.
-
getEvaluationAtResult
Returns function evaluation at estimated minimum point.- Returns:
- Function evaluation at minimum.
- Throws:
NotAvailableException
- Raised if a minimum is not yet available for retrieval.
-