Class ApproximationSetCollector
java.lang.Object
org.moeaframework.analysis.collector.ApproximationSetCollector
- All Implemented Interfaces:
Collector
Collects approximation sets from an
Algorithm
.-
Constructor Summary
ConstructorDescriptionConstructs an unattached collector for recording Pareto dominance approximation sets from an algorithm.ApproximationSetCollector
(Algorithm algorithm, Epsilons epsilons) Constructs a collector for recording approximation sets from the specified algorithm.ApproximationSetCollector
(Epsilons epsilons) Constructs an unattached collector for recording ε-box dominance approximation sets from an algorithm. -
Method Summary
Modifier and TypeMethodDescriptionReturns a new instance of this collector which has been attached to the specified object as identified by the attach point returned throughCollector.getAttachPoint()
.void
collect
(Observation observation) Collects the requested information from the object, storing the data to the specified observation.static NondominatedPopulation
getApproximationSet
(Observation observation) Reads the approximation set from the observation.Returns the attach point describing where this collector is attached.
-
Constructor Details
-
ApproximationSetCollector
public ApproximationSetCollector()Constructs an unattached collector for recording Pareto dominance approximation sets from an algorithm. -
ApproximationSetCollector
Constructs an unattached collector for recording ε-box dominance approximation sets from an algorithm.- Parameters:
epsilons
- the ε-values used when collecting only the ε-dominant solutions; ornull
if regular Pareto dominance is used
-
ApproximationSetCollector
Constructs a collector for recording approximation sets from the specified algorithm.- Parameters:
algorithm
- the algorithm this collector records data fromepsilons
- the ε-values used when collecting only the ε-dominant solutions; ornull
if regular Pareto dominance is used
-
-
Method Details
-
getAttachPoint
Description copied from interface:Collector
Returns the attach point describing where this collector is attached. The matched object should be unique.- Specified by:
getAttachPoint
in interfaceCollector
- Returns:
- the attach point describing where this collector is attached
-
attach
Description copied from interface:Collector
Returns a new instance of this collector which has been attached to the specified object as identified by the attach point returned throughCollector.getAttachPoint()
. -
collect
Description copied from interface:Collector
Collects the requested information from the object, storing the data to the specified observation. This method must only be invoked after this collector has been attached to an appropriate object. -
getApproximationSet
Reads the approximation set from the observation.- Parameters:
observation
- the observation- Returns:
- the approximation set
-