public class Opt4JTask extends Task implements ControlListener, OptimizerIterationListener
Opt4JTask executes one optimization process.TaskTask.State| Constructor and Description |
|---|
Opt4JTask()
Constructs a
Opt4JTask. |
Opt4JTask(boolean closeOnStop)
Constructs a
Opt4JTask. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the task.
|
void |
execute()
Executes the
Task. |
<O> O |
getInstance(Class<O> type)
Returns the instance of the given class.
|
int |
getIteration()
Returns the current iteration.
|
void |
init(com.google.inject.Injector injector)
Initialize with a parent
Injector. |
void |
iterationComplete(Optimizer optimizer,
int iteration)
Invoked if the
Optimizer completes an iteration. |
void |
open()
Initialize a task manually before executing it.
|
void |
stateChanged(Control.State state)
Invoked if the state of the
Control changes. |
addStateListener, call, getException, getModules, getState, init, init, removeStateListener, toString@Inject public Opt4JTask()
Opt4JTask.public Opt4JTask(boolean closeOnStop)
Opt4JTask.closeOnStop - close automatically after optimizationpublic void execute()
throws Exception
TaskTask.public void init(com.google.inject.Injector injector)
Injector.injector - the parent injectorpublic void close()
public void open()
public int getIteration()
public <O> O getInstance(Class<O> type)
O - the type of classtype - the classpublic void stateChanged(Control.State state)
ControlListenerControl changes.stateChanged in interface ControlListenerstate - the current state of the optimization processpublic void iterationComplete(Optimizer optimizer, int iteration)
OptimizerIterationListenerOptimizer completes an iteration.iterationComplete in interface OptimizerIterationListeneroptimizer - the optimizeriteration - the completed iteration