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 behaviour 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:
Engine
,Engine.Builder
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EvolutionParams.Builder<G extends Gene<?,G>,C extends Comparable<? super C>>
Builder class for the evolution parameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Alterer<G,C>
alterer()
Return the usedAlterer
of the GA.static <G extends Gene<?,G>,C extends Comparable<? super C>>
EvolutionParams.Builder<G,C>builder()
Create a new evolution parameter builder.long
maximalPhenotypeAge()
Return the maximal allowed phenotype age.double
offspringFraction()
Return the offspring fraction.Selector<G,C>
offspringSelector()
Return the used offspringSelector
of the GA.int
offspringSize()
Return the number of offspring.int
populationSize()
Return the population size.Selector<G,C>
survivorsSelector()
Return the used survivorSelector
of the GA.int
survivorsSize()
Return the number of survivors.EvolutionParams.Builder<G,C>
toBuilder()
Return a new builder object, initialized withthis
parameters.
-
-
-
Method Detail
-
survivorsSelector
public Selector<G,C> survivorsSelector()
Return the used survivorSelector
of the GA.- Returns:
- the used survivor
Selector
of the GA.
-
offspringSelector
public Selector<G,C> offspringSelector()
Return the used offspringSelector
of the GA.- Returns:
- the used offspring
Selector
of the GA.
-
alterer
public Alterer<G,C> alterer()
Return the usedAlterer
of the GA.- Returns:
- the used
Alterer
of the GA.
-
populationSize
public int populationSize()
Return the population size.- Returns:
- the population size
-
offspringFraction
public double offspringFraction()
Return the offspring fraction.- Returns:
- the offspring fraction.
-
maximalPhenotypeAge
public long maximalPhenotypeAge()
Return the maximal allowed phenotype age.- Returns:
- the maximal allowed phenotype age
-
offspringSize
public int offspringSize()
Return the number of offspring. This is a derived property.- Returns:
- the offspring count.
-
survivorsSize
public int survivorsSize()
Return the number of survivors. This is a derived property.- Returns:
- the number of survivors
-
toBuilder
public EvolutionParams.Builder<G,C> toBuilder()
Return a new builder object, initialized withthis
parameters.- Returns:
- a new pre-filled builder object
-
builder
public static <G extends Gene<?,G>,C extends Comparable<? super C>> EvolutionParams.Builder<G,C> builder()
Create a new evolution parameter builder.- Type Parameters:
G
- the gene typeC
- the fitness function result type- Returns:
- a new parameter builder
-
-