public class CouplerUnique extends Object implements Coupler
CouplerUnique uses the set of parents and creates couples
randomly from this set. Parent pairs never contain equal Individuals.| Constructor and Description |
|---|
CouplerUnique(Rand random)
Constructs a
CouplerRandom. |
| Modifier and Type | Method and Description |
|---|---|
Collection<Pair<Individual>> |
getCouples(int size,
List<Individual> parents)
Returns a list of
Individual-groups (couples) that are designated
to create offspring. |
@Inject public CouplerUnique(Rand random)
CouplerRandom.random - the random number generatorpublic Collection<Pair<Individual>> getCouples(int size, List<Individual> parents)
CouplerIndividual-groups (couples) that are designated
to create offspring.getCouples in interface Couplersize - the number of couples to createparents - the parents