R
- the representation type of the solution to be recombinedpublic abstract class ContinuousRecombine<R,S extends Solution<io.vavr.collection.Array<R>>> extends java.lang.Object implements Recombination<S>
Abstract implementation of a continuous recombination.The recombined value is located continuously between the parents values.
Concrete subclasses are supposed to provide the actual computation.
Modifier and Type | Class and Description |
---|---|
static interface |
io.vavr.Lambda.Memoized |
Constructor and Description |
---|
ContinuousRecombine() |
Modifier and Type | Method and Description |
---|---|
default boolean |
isMemoized() |
protected abstract io.vavr.Tuple2<io.vavr.collection.Array<R>,io.vavr.collection.Array<R>> |
recombine(io.vavr.collection.Array<R> representation1,
io.vavr.collection.Array<R> representation2,
int index)
Recombines the representations at the given index.
|
io.vavr.Tuple2<S,S> |
recombine(S solution1,
S solution2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public final io.vavr.Tuple2<S,S> recombine(S solution1, S solution2)
recombine
in interface Recombination<S extends Solution<io.vavr.collection.Array<R>>>
protected abstract io.vavr.Tuple2<io.vavr.collection.Array<R>,io.vavr.collection.Array<R>> recombine(io.vavr.collection.Array<R> representation1, io.vavr.collection.Array<R> representation2, int index)
Recombines the representations at the given index.
This method purpose is to allow efficient unboxing in case of representations of primitives.
representation1
- the first representationrepresentation2
- the second representationindex
- the index at which recombination should occurpublic boolean isMemoized()