Module io.jenetics.base
Package io.jenetics.engine
Class EvolutionParams<G extends Gene<?,G>,C extends Comparable<? super C>>
java.lang.Object
io.jenetics.engine.EvolutionParams<G,C>
- Type Parameters:
G- the gene typeC- the fitness function result type
- All Implemented Interfaces:
Serializable
public final class EvolutionParams<G extends Gene<?,G>,C extends Comparable<? super C>>
extends Object
implements Serializable
This class collects the parameters which control the behavior of the
evolution process. This doesn't include the parameters for the
technical execution like the used execution service.
- Since:
- 5.2
- Version:
- 5.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classEvolutionParams.Builder<G extends Gene<?,G>, C extends Comparable<? super C>> Builder class for the evolution parameter. -
Method Summary
Modifier and TypeMethodDescriptionalterer()Return the usedAltererof the GA.static <G extends Gene<?,G>, C extends Comparable<? super C>>
EvolutionParams.Builder<G, C> builder()Create a new evolution parameter builder.longReturn the maximal allowed phenotype age.doubleReturn the offspring fraction.Return the used offspringSelectorof the GA.intReturn the number of offspring.intReturn the population size.Return the used survivorSelectorof the GA.intReturn the number of survivors.Return a new builder object, initialized withthisparameters.
-
Method Details
-
survivorsSelector
Return the used survivorSelectorof the GA.- Returns:
- the used survivor
Selectorof the GA.
-
offspringSelector
Return the used offspringSelectorof the GA.- Returns:
- the used offspring
Selectorof the GA.
-
alterer
Return the usedAltererof the GA.- Returns:
- the used
Altererof the GA.
-
populationSize
Return the population size.- Returns:
- the population size
-
offspringFraction
Return the offspring fraction.- Returns:
- the offspring fraction.
-
maximalPhenotypeAge
Return the maximal allowed phenotype age.- Returns:
- the maximal allowed phenotype age
-
offspringSize
Return the number of offspring. This is a derived property.- Returns:
- the offspring count.
-
survivorsSize
Return the number of survivors. This is a derived property.- Returns:
- the number of survivors
-
toBuilder
Return a new builder object, initialized withthisparameters.- Returns:
- a new pre-filled builder object
-
builder
public static <G extends Gene<?,G>, EvolutionParams.Builder<G,C extends Comparable<? super C>> C> builder()Create a new evolution parameter builder.- Type Parameters:
G- the gene typeC- the fitness function result type- Returns:
- a new parameter builder
-