Class SingleSolutionReplacement<S extends Solution<?>>
java.lang.Object
org.uma.jmetal.component.catalogue.ea.replacement.impl.SingleSolutionReplacement<S>
- Type Parameters:
S-
- All Implemented Interfaces:
Replacement<S>
public class SingleSolutionReplacement<S extends Solution<?>>
extends Object
implements Replacement<S>
Given an offspring population composed of a single solution, this solution is compared against a particular solution
of the population given by a
SequenceGenerator object. If this last solution is replaced by the former if
it is worse according to a Comparator.
Once the replacement is carried out, the next sequence number is generated.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.uma.jmetal.component.catalogue.ea.replacement.Replacement
Replacement.RemovalPolicy -
Constructor Summary
ConstructorsConstructorDescriptionSingleSolutionReplacement(SequenceGenerator<Integer> sequenceGenerator, Comparator<S> comparator) -
Method Summary
-
Constructor Details
-
SingleSolutionReplacement
public SingleSolutionReplacement(SequenceGenerator<Integer> sequenceGenerator, Comparator<S> comparator)
-
-
Method Details
-
replace
- Specified by:
replacein interfaceReplacement<S extends Solution<?>>
-