public abstract class IntegerStochasticMutate extends StochasticMutate<java.lang.Integer,IntegerVectorSolution>
Abstract class which efficiently unboxes Integer.
Modifier and Type | Class and Description |
---|---|
static interface |
io.vavr.Lambda.Memoized |
Constructor and Description |
---|
IntegerStochasticMutate(DoubleRandomGenerator doubleRand,
IntRandomGenerator intRand) |
Modifier and Type | Method and Description |
---|---|
protected io.vavr.collection.Array<java.lang.Integer> |
doMutate(io.vavr.collection.Array<java.lang.Integer> representation,
int index)
Mutate the representation at the given index.
|
protected abstract int |
doMutate(int value)
Perform the actual mutation on a primitive int.
|
default boolean |
isMemoized() |
mutate
IntegerStochasticMutate(DoubleRandomGenerator doubleRand, IntRandomGenerator intRand)
protected final io.vavr.collection.Array<java.lang.Integer> doMutate(io.vavr.collection.Array<java.lang.Integer> representation, int index)
StochasticMutate
Mutate the representation at the given index.
This method purpose is to allow efficient unboxing in case of representations of primitives.
doMutate
in class StochasticMutate<java.lang.Integer,IntegerVectorSolution>
representation
- the representation to be mutatedindex
- the index at which mutation should occurprotected abstract int doMutate(int value)
Perform the actual mutation on a primitive int.
value
- The old valuepublic boolean isMemoized()