public class CouplerRandom extends Object implements Coupler
CouplerRandom uses the set of parents and creates couples
randomly from this set. In particular, there is no handling for duplicated
Individuals in the parents list or in one couple.| Constructor and Description |
|---|
CouplerRandom(Rand random)
Constructs a
CouplerRandom with a given Rand random
number generator. |
| 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 CouplerRandom(Rand random)
CouplerRandom with a given Rand random
number generator.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