public final class TournamentPreselection<R extends java.io.Serializable,T extends Solution<io.vavr.collection.Array<R>>> extends ArrayPreselection<R,T>
Tournament preselect implementation.
Modifier and Type | Class and Description |
---|---|
static interface |
io.vavr.Lambda.Memoized |
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
logger |
private IntRandomGenerator |
rand |
Constructor and Description |
---|
TournamentPreselection(IntRandomGenerator rand) |
Modifier and Type | Method and Description |
---|---|
default boolean |
isMemoized() |
protected int[] |
preselectIndices(double[] values)
Performs the actual preselection.
|
preselect
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
private static final org.slf4j.Logger logger
private final IntRandomGenerator rand
public TournamentPreselection(IntRandomGenerator rand)
protected int[] preselectIndices(double[] values)
ArrayPreselection
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.
preselectIndices
in class ArrayPreselection<R extends java.io.Serializable,T extends Solution<io.vavr.collection.Array<R>>>
values
- The solutions evaluation valuespublic boolean isMemoized()