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
Nested ClassesModifier and TypeClassDescriptionprotected classThe selection box for the current two objectives. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.opt4j.viewer.SynchronizedIndividualSetprotected final JPanelprotected final org.opt4j.viewer.SynchronizedIndividualSetprotected final ParetoPlotWidget.Selectionprotected final DelayTask -
Constructor Summary
ConstructorsConstructorDescriptionParetoPlotWidget(Population population, Archive archive, Optimizer optimizer, ObjectivesMonitor objectivesMonitor, AutoZoomButton autoZoomButton) Constructs aParetoPlotWidget. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoPaint()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.voidCalled 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(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:WidgetCalled once after the widget is added to theViewport. -
iterationComplete
Description copied from interface:OptimizerIterationListenerInvoked if theOptimizercompletes an iteration.- Specified by:
iterationCompletein 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:WidgetReturns the panel with the content. -
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
-