- Enclosing class:
ShuffleMutator<G extends Gene<?,
G>, C extends Comparable<? super C>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for creating random range objects for
shuffling sequences of a given length.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ShuffleMutator.RangeRandom
Random range generator, which creates ranges with uniformly distributed range indexes. -
Method Summary
Modifier and TypeMethodDescriptionnewRange
(RandomGenerator random, int length) Create a new random range for shuffling sequences with a givenlength
.static ShuffleMutator.RangeRandom
Create a new random range generator, which uses the given distributions for creating the shift points.static ShuffleMutator.RangeRandom
Create a new random range generator, which uses the given distributions for creating the range points.
-
Field Details
-
UNIFORM
Random range generator, which creates ranges with uniformly distributed range indexes. Both the length and the shift indexes are chosen uniformly.
-
-
Method Details
-
newRange
Create a new random range for shuffling sequences with a givenlength
.- Parameters:
random
- the random generator to be used for creating a new rangelength
- the length of the sequence to be shuffled- Returns:
- a new randomly created shuffle range
-
of
Create a new random range generator, which uses the given distributions for creating the range points.- Parameters:
lengthSampler
- the sampler used for creating the shifted gene countindexSampler
- the sampler used for creating the shift indexes- Returns:
- a new random range generator with the given parameters
-
of
Create a new random range generator, which uses the given distributions for creating the shift points. The shift indexes are uniformly distributed.- Parameters:
lengthSampler
- the sampler used for creating the shifted gene count- Returns:
- a new random shift generator with the given parameters
- See Also:
-