public abstract class DoubleStochasticMutate extends StochasticMutate<java.lang.Double,DoubleVectorSolution>
Abstract class which efficiently unboxes Double.
Modifier and Type | Class and Description |
---|---|
static interface |
io.vavr.Lambda.Memoized |
Constructor and Description |
---|
DoubleStochasticMutate(DoubleRandomGenerator doubleRand,
IntRandomGenerator intRand) |
Modifier and Type | Method and Description |
---|---|
protected io.vavr.collection.Array<java.lang.Double> |
doMutate(io.vavr.collection.Array<java.lang.Double> representation,
int index)
Mutate the representation at the given index.
|
protected abstract double |
doMutate(double value)
Perform the actual mutation on a primitive double.
|
default boolean |
isMemoized() |
mutate
DoubleStochasticMutate(DoubleRandomGenerator doubleRand, IntRandomGenerator intRand)
protected final io.vavr.collection.Array<java.lang.Double> doMutate(io.vavr.collection.Array<java.lang.Double> 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.Double,DoubleVectorSolution>
representation
- the representation to be mutatedindex
- the index at which mutation should occurprotected abstract double doMutate(double value)
Perform the actual mutation on a primitive double.
value
- The old valuepublic boolean isMemoized()