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
The
ConvergencePlotWidget
plots the convergence for each
Objective
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionConvergencePlotWidget
(Optimizer optimizer, org.opt4j.viewer.ConvergencePlotData data, ObjectivesMonitor objectivesMonitor, AutoZoomButton autoZoom) Constructs aConvergencePlotWidget
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doPaint()
Force a repaint of the plot.getPanel()
Returns the panel with the content.void
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 Details
-
isObjectivesInitialized
protected final boolean isObjectivesInitialized- See Also:
-
task
-
data
protected final org.opt4j.viewer.ConvergencePlotData data -
selection
protected final org.opt4j.viewer.ConvergencePlotWidget.Selection selection -
panel
-
-
Constructor Details
-
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 Details
-
getPanel
Description copied from interface:Widget
Returns the panel with the content. -
init
Description copied from interface:Widget
Called once after the widget is added to theViewport
. -
iterationComplete
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
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
-