Module io.jenetics.base
Package io.jenetics.engine
Class EvolutionStart<G extends Gene<?,G>,C extends Comparable<? super C>>
java.lang.Object
io.jenetics.engine.EvolutionStart<G,C>
- Type Parameters:
G
- the gene typeC
- the fitness type
- All Implemented Interfaces:
Serializable
public final class EvolutionStart<G extends Gene<?,G>,C extends Comparable<? super C>>
extends Object
implements Serializable
Represents a state of the GA at the start of an evolution step.
- Since:
- 3.1
- Version:
- 6.0
- See Also:
- Implementation Note:
- This class is immutable and thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <G extends Gene<?,
G>, C extends Comparable<? super C>>
EvolutionStart<G,C> empty()
An empty evolution start object, which can be used as initial evolution value.boolean
long
Return the generation of the start population.int
hashCode()
static <G extends Gene<?,
G>, C extends Comparable<? super C>>
EvolutionStart<G,C> Create a new evolution start object with the given population and for the given generation.Return the population before the evolution step.toString()
-
Method Details
-
population
Return the population before the evolution step.- Returns:
- the start population
-
generation
Return the generation of the start population.- Returns:
- the start generation
-
hashCode
-
equals
-
toString
-
of
public static <G extends Gene<?,G>, EvolutionStart<G,C extends Comparable<? super C>> C> of(ISeq<Phenotype<G, C>> population, long generation) Create a new evolution start object with the given population and for the given generation.- Type Parameters:
G
- the gene typeC
- the fitness type- Parameters:
population
- the start population.generation
- the start generation of the population- Returns:
- a new evolution start object
- Throws:
NullPointerException
- if the givenpopulation
isnull
.IllegalArgumentException
- if the givengeneration
is smaller then one
-
empty
An empty evolution start object, which can be used as initial evolution value. The evolutionEngine
is then responsible for creating the proper initial population,- Type Parameters:
G
- the gene typeC
- the fitness type- Returns:
- an empty evolution start object
- Since:
- 5.1
-