- Enclosing class:
ShiftMutator<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 shift ranges objects for
shifting sequences of a given length.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ShiftMutator.RangeRandom
Random shift range generator, which creates shifter with uniformly distributed shifting points. -
Method Summary
Modifier and TypeMethodDescriptionnewRange
(RandomGenerator random, int length) Create a new random shift range for shifting sequences with a givenlength
.static ShiftMutator.RangeRandom
Create a new random shift range generator, which uses the given distributions for creating the shift points.static ShiftMutator.RangeRandom
Create a new random shift range generator, which uses the given distributions for creating the shift points.
-
Field Details
-
UNIFORM
Random shift range generator, which creates shifter with uniformly distributed shifting points. Both the length and the shift indexes are chosen uniformly.
-
-
Method Details
-
newRange
Create a new random shift range for shifting sequences with a givenlength
.- Parameters:
random
- the random generator to be used for creating a new shifterlength
- the length of the sequence to be shifted- Returns:
- a new randomly created shifter
-
of
Create a new random shift range generator, which uses the given distributions for creating the shift points.- Parameters:
lengthSampler
- the sampler used for creating the shifted gene countindexSampler
- the sampler used for creating the shift indexes- Returns:
- a new random shift generator with the given parameters
-
of
Create a new random shift 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:
-