Class NeatSelection<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.neat.spec.selection.NeatSelection<T>
- All Implemented Interfaces:
SelectionPolicy
- Direct Known Subclasses:
ImmutableNeatSelection
@Immutable
public abstract class NeatSelection<T extends Comparable<T>>
extends Object
implements SelectionPolicy
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <U extends Comparable<U>>
NeatSelection.Builder<U> builder()
void
check()
int
static <U extends Comparable<U>>
NeatSelection<U> of
(float perSpeciesKeepRatio, BiPredicate<Individual<U>, Individual<U>> speciesPredicate, SelectionPolicy speciesSelection) static <U extends Comparable<U>>
NeatSelection<U> of
(BiPredicate<Individual<U>, Individual<U>> speciesPredicate, SelectionPolicy speciesSelection) static <U extends Comparable<U>>
NeatSelection<U> Construct a default NeatSelection based on standard parameters: - Neat compatibility distance with standard coefficients of weight 1.0 and excess and disjoint genes of 2.float
abstract BiPredicate
<Individual<T>, Individual<T>> abstract SelectionPolicy
-
Constructor Details
-
NeatSelection
public NeatSelection()
-
-
Method Details
-
perSpeciesKeepRatio
@Default public float perSpeciesKeepRatio() -
minSpeciesSize
@Default public int minSpeciesSize() -
speciesPredicate
-
speciesSelection
-
check
@Check public void check() -
builder
-
of
public static <U extends Comparable<U>> NeatSelection<U> of(float perSpeciesKeepRatio, BiPredicate<Individual<U>, Individual<U>> speciesPredicate, SelectionPolicy speciesSelection) -
of
public static <U extends Comparable<U>> NeatSelection<U> of(BiPredicate<Individual<U>, Individual<U>> speciesPredicate, SelectionPolicy speciesSelection) -
ofDefault
Construct a default NeatSelection based on standard parameters: - Neat compatibility distance with standard coefficients of weight 1.0 and excess and disjoint genes of 2. As well as distance threshold of 1 - Tournaments of 3 individuals- Type Parameters:
U
-- Returns:
-