public abstract class ArrayPreselection<R extends java.io.Serializable,T extends Solution<io.vavr.collection.Array<R>>> extends java.lang.Object implements Preselection<T>
Abstract Preselection
implementation. Relies on subclasses to provide the indices of the preselected solution (note that any solution may be chosen multiple times).
Modifier and Type | Class and Description |
---|---|
static interface |
io.vavr.Lambda.Memoized |
Constructor and Description |
---|
ArrayPreselection() |
Modifier and Type | Method and Description |
---|---|
default boolean |
isMemoized() |
io.vavr.collection.List<T> |
preselect(io.vavr.collection.List<T> population) |
protected abstract int[] |
preselectIndices(double[] values)
Performs the actual preselection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public final io.vavr.collection.List<T> preselect(io.vavr.collection.List<T> population)
preselect
in interface Preselection<T extends Solution<io.vavr.collection.Array<R>>>
protected abstract int[] preselectIndices(double[] values)
Performs the actual preselection. Given an array of evaluation values, returns an array containing indices of the preselected solutions. Any given solution may be preselected multiple times, in which case it will be copied in the resulting preselected population.
values
- The solutions evaluation valuespublic boolean isMemoized()