|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectiterator.AbstractIterator
iterator.AbstractOptimizer<T>
T - a subclass of OptimizationProblem.public abstract class AbstractOptimizer<T extends OptimizationProblem>
Abstract class that provides some basic methods for any optimization algorithm. Parametrized by the kind of OptimizationProblem under consideration.
| Field Summary | |
|---|---|
protected static corejava.Format |
doubleFormat
|
protected int |
funEvalCount
|
protected java.io.PrintWriter |
logWriter
|
| Fields inherited from class iterator.AbstractIterator |
|---|
diagnosticString, iter |
| Constructor Summary | |
|---|---|
AbstractOptimizer()
|
|
| Method Summary | |
|---|---|
void |
clear()
Notification that all data has been removed. |
int |
dataAdded(DataBlock block)
Notification that a DataBlock has been added. |
boolean |
dataAdded(DataPoint dataPoint)
Notification that a single DataPoint has been added. |
int |
dataRemoved(DataBlock dataBlock)
Notification that a DataBlock has been removed. |
boolean |
dataRemoved(DataPoint dataPoint)
Notification that a single DataPoint has been removed. |
OptimizationDataHandler |
getDataHandler()
Returns the OptimizationDataHandler that handles the data for this
problem. |
protected int |
getFunEvalCount()
Returns the number of function evaluations. |
java.lang.String |
getLogFileName()
Returns the name of the log file name for this optimizer. |
int |
getMaxFunEval()
Returns the maximum number of allowed function evaluations. |
T |
getProblem()
Returns the problem that this iterator tries to solve. |
void |
init()
Initialization routine |
boolean |
isTerminated()
Returns true if termination criteria are satisfied. |
void |
iterate()
Iterates until termination. |
void |
setDataHandler(OptimizationDataHandler dataHandler)
Sets the data handler for this problem. |
protected void |
setFunEvalCount(int funEvalCount)
Sets the number of function evaluations. |
void |
setLogFileName(java.lang.String logFileName)
Sets the log file name. |
void |
setMaxFunEval(int maxFunEval)
Sets the maximum number of allowed function evaluations. |
void |
setProblem(T problem)
Sets the problem for this iterator to solve. |
protected void |
updateDiagnostics()
Provides access to the diagnosticString, so that the user has
flexibility over multiple methods accessing this string at different times. |
protected void |
writeInitialRunLog()
|
| Methods inherited from class iterator.AbstractIterator |
|---|
isVerbose, printDiagnostics, setVerbose |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface iterator.Iterable |
|---|
singleIteration |
| Field Detail |
|---|
protected static final corejava.Format doubleFormat
protected int funEvalCount
protected java.io.PrintWriter logWriter
| Constructor Detail |
|---|
public AbstractOptimizer()
| Method Detail |
|---|
public void clear()
DataListener
clear in interface DataListenerpublic int dataAdded(DataBlock block)
DataListenerDataBlock has been added.
dataAdded in interface DataListenerblock - the DataBlock added.
public boolean dataAdded(DataPoint dataPoint)
DataListenerDataPoint has been added.
dataAdded in interface DataListenerdataPoint - the DataPoint added.
true if the DataPoint was successfully added.public int dataRemoved(DataBlock dataBlock)
DataListenerDataBlock has been removed.
dataRemoved in interface DataListenerdataBlock - the DataBlock removed.
DataPoints successfully removed.public boolean dataRemoved(DataPoint dataPoint)
DataListenerDataPoint has been removed.
dataRemoved in interface DataListenerdataPoint - the DataPointremoved.
true if the DataPoint was successfully
removed.public OptimizationDataHandler getDataHandler()
OptimizationDataHandler that handles the data for this
problem.
public java.lang.String getLogFileName()
getLogFileName in interface LoggableIteratorpublic int getMaxFunEval()
public T getProblem()
public void init()
Iterable
init in interface Iterablepublic boolean isTerminated()
Iterabletrue if termination criteria are satisfied.
isTerminated in interface Iterabletrue when done.public void iterate()
Iterable
iterate in interface Iterableiterate in class AbstractIteratorpublic void setDataHandler(OptimizationDataHandler dataHandler)
OptimizationDataHandler that can process the designs that this
iterator finds during optimization.
dataHandler - the given OptimizationDataHandler.public void setLogFileName(java.lang.String logFileName)
LoggableIterator
setLogFileName in interface LoggableIteratorlogFileName - public void setMaxFunEval(int maxFunEval)
maxFunEval - the given maxFunEval.public void setProblem(T problem)
problem - the given optimization problem.protected int getFunEvalCount()
protected void setFunEvalCount(int funEvalCount)
funEvalCount - the given number of evaluations.protected void updateDiagnostics()
AbstractIteratordiagnosticString, so that the user has
flexibility over multiple methods accessing this string at different times.
updateDiagnostics in class AbstractIteratorprotected void writeInitialRunLog()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||