Package org.opt4j.viewer
Class ConvergencePlotWidget
- java.lang.Object
-
- org.opt4j.viewer.ConvergencePlotWidget
-
- All Implemented Interfaces:
OptimizerIterationListener
,ObjectivesMonitor.ObjectivesListener
,Widget
public class ConvergencePlotWidget extends Object implements Widget, OptimizerIterationListener, ObjectivesMonitor.ObjectivesListener
TheConvergencePlotWidget
plots the convergence for eachObjective
.
-
-
Constructor Summary
Constructors Constructor Description ConvergencePlotWidget(Optimizer optimizer, org.opt4j.viewer.ConvergencePlotData data, ObjectivesMonitor objectivesMonitor, AutoZoomButton autoZoom)
Constructs aConvergencePlotWidget
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doPaint()
Force a repaint of the plot.JPanel
getPanel()
Returns the panel with the content.void
init(Viewport viewport)
Called once after the widget is added to theViewport
.void
iterationComplete(Optimizer optimizer, int iteration)
Invoked if theOptimizer
completes an iteration.void
objectives(Collection<Objective> objectives)
Callback method that passes the objectives of the optimization problem.protected void
paint()
Repaints the plot.
-
-
-
Field Detail
-
isObjectivesInitialized
protected final boolean isObjectivesInitialized
- See Also:
- Constant Field Values
-
task
protected final DelayTask task
-
data
protected final org.opt4j.viewer.ConvergencePlotData data
-
selection
protected final org.opt4j.viewer.ConvergencePlotWidget.Selection selection
-
panel
protected final JPanel panel
-
-
Constructor Detail
-
ConvergencePlotWidget
@Inject public ConvergencePlotWidget(Optimizer optimizer, org.opt4j.viewer.ConvergencePlotData data, ObjectivesMonitor objectivesMonitor, AutoZoomButton autoZoom)
Constructs aConvergencePlotWidget
.- Parameters:
optimizer
- the optimizerdata
- the dataobjectivesMonitor
- the objective monitor that determine the objective of the optimization problem
-
-
Method Detail
-
getPanel
public JPanel getPanel()
Description copied from interface:Widget
Returns the panel with the content.
-
init
public void init(Viewport viewport)
Description copied from interface:Widget
Called once after the widget is added to theViewport
.
-
iterationComplete
public void iterationComplete(Optimizer optimizer, int iteration)
Description copied from interface:OptimizerIterationListener
Invoked if theOptimizer
completes an iteration.- Specified by:
iterationComplete
in interfaceOptimizerIterationListener
- Parameters:
optimizer
- the optimizeriteration
- the completed iteration
-
doPaint
protected void doPaint()
Force a repaint of the plot.
-
paint
protected void paint()
Repaints the plot. Do not call this method directly, calldoPaint()
instead.
-
objectives
public void objectives(Collection<Objective> objectives)
Description copied from interface:ObjectivesMonitor.ObjectivesListener
Callback method that passes the objectives of the optimization problem.- Specified by:
objectives
in interfaceObjectivesMonitor.ObjectivesListener
- Parameters:
objectives
- the objectives
-
-