public final class BinaryMutate extends StochasticMutate<java.lang.Boolean,BooleanVectorSolution>
Flips the given binary feature.
Modifier and Type | Class and Description |
---|---|
static interface |
io.vavr.Lambda.Memoized |
Constructor and Description |
---|
BinaryMutate(DoubleRandomGenerator doubleRand,
IntRandomGenerator intRand) |
Modifier and Type | Method and Description |
---|---|
protected io.vavr.collection.Array<java.lang.Boolean> |
doMutate(io.vavr.collection.Array<java.lang.Boolean> representation,
int index)
Mutate the representation at the given index.
|
default boolean |
isMemoized() |
mutate
public BinaryMutate(DoubleRandomGenerator doubleRand, IntRandomGenerator intRand)
protected io.vavr.collection.Array<java.lang.Boolean> doMutate(io.vavr.collection.Array<java.lang.Boolean> 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.Boolean,BooleanVectorSolution>
representation
- the representation to be mutatedindex
- the index at which mutation should occurpublic boolean isMemoized()