Package org.opt4j.viewer
Class ParetoPlotWidget
java.lang.Object
org.opt4j.viewer.ParetoPlotWidget
- All Implemented Interfaces:
OptimizerIterationListener
,ObjectivesMonitor.ObjectivesListener
,Widget
public class ParetoPlotWidget
extends Object
implements OptimizerIterationListener, Widget, ObjectivesMonitor.ObjectivesListener
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
The selection box for the current two objectives. -
Field Summary
Modifier and TypeFieldDescriptionprotected final org.opt4j.viewer.SynchronizedIndividualSet
protected final JPanel
protected final org.opt4j.viewer.SynchronizedIndividualSet
protected final ParetoPlotWidget.Selection
protected final DelayTask
-
Constructor Summary
ConstructorDescriptionParetoPlotWidget
(Population population, Archive archive, Optimizer optimizer, ObjectivesMonitor objectivesMonitor, AutoZoomButton autoZoomButton) Constructs aParetoPlotWidget
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doPaint()
Repaints the diagram.getPanel()
Returns the panel with the content.protected Set<Point2D.Double>
getPoints
(Collection<Individual> indivualCollection, Objective one, Objective two) Returns the two dimensional representation of the givenIndividualCollection
.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
(Collection<Individual> archive, Collection<Individual> population) Repaints the diagram.
-
Field Details
-
population
protected final org.opt4j.viewer.SynchronizedIndividualSet population -
archive
protected final org.opt4j.viewer.SynchronizedIndividualSet archive -
task
-
selection
-
panel
-
-
Constructor Details
-
ParetoPlotWidget
@Inject public ParetoPlotWidget(Population population, Archive archive, Optimizer optimizer, ObjectivesMonitor objectivesMonitor, AutoZoomButton autoZoomButton) Constructs aParetoPlotWidget
.- Parameters:
population
- the populationarchive
- the archiveoptimizer
- the optimizerobjectivesMonitor
- the objective monitor that determine the objective of the optimization problem
-
-
Method Details
-
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
-
getPoints
protected Set<Point2D.Double> getPoints(Collection<Individual> indivualCollection, Objective one, Objective two) Returns the two dimensional representation of the givenIndividualCollection
.- Parameters:
indivualCollection
- the {IndividualCollection- Returns:
- a set of points
-
doPaint
protected void doPaint()Repaints the diagram. -
paint
Repaints the diagram. -
getPanel
Description copied from interface:Widget
Returns the panel with the content. -
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
-