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
TheConvergencePlotWidgetplots 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 voiddoPaint()Force a repaint of the plot.JPanelgetPanel()Returns the panel with the content.voidinit(Viewport viewport)Called once after the widget is added to theViewport.voiditerationComplete(Optimizer optimizer, int iteration)Invoked if theOptimizercompletes an iteration.voidobjectives(Collection<Objective> objectives)Callback method that passes the objectives of the optimization problem.protected voidpaint()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:WidgetReturns the panel with the content.
-
init
public void init(Viewport viewport)
Description copied from interface:WidgetCalled once after the widget is added to theViewport.
-
iterationComplete
public void iterationComplete(Optimizer optimizer, int iteration)
Description copied from interface:OptimizerIterationListenerInvoked if theOptimizercompletes an iteration.- Specified by:
iterationCompletein 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.ObjectivesListenerCallback method that passes the objectives of the optimization problem.- Specified by:
objectivesin interfaceObjectivesMonitor.ObjectivesListener- Parameters:
objectives- the objectives
-
-