public class CouplerDefault extends java.lang.Object implements Coupler
CouplerDefault
uses the pairs based on their index in the list:
p0+p1,p2+p3,etc.
.Constructor and Description |
---|
CouplerDefault() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<org.opt4j.operators.crossover.Pair<org.opt4j.core.Individual>> |
getCouples(int size,
java.util.List<org.opt4j.core.Individual> parents)
Returns a list of
Individual -groups (couples) that are designated
to create offspring. |
public java.util.Collection<org.opt4j.operators.crossover.Pair<org.opt4j.core.Individual>> getCouples(int size, java.util.List<org.opt4j.core.Individual> parents)
Coupler
Individual
-groups (couples) that are designated
to create offspring.getCouples
in interface Coupler
size
- the number of couples to createparents
- the parents