public final class StochasticPreselection<R extends java.io.Serializable,T extends Solution<io.vavr.collection.Array<R>>> extends ArrayPreselection<R,T>
Stochastic universal sampling implementation. Scales solutions evaluations using a provided Scaling
.
Modifier and Type | Class and Description |
---|---|
static interface |
io.vavr.Lambda.Memoized |
Modifier and Type | Field and Description |
---|---|
private NormalizedDoubleRandomGenerator |
rand |
private Scaling |
scaling |
Constructor and Description |
---|
StochasticPreselection(Scaling scaling,
NormalizedDoubleRandomGenerator 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 final Scaling scaling
private final NormalizedDoubleRandomGenerator rand
public StochasticPreselection(Scaling scaling, NormalizedDoubleRandomGenerator 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()