Package io.jenetics.engine
Class EvolutionInit<G extends Gene<?,G>>
- java.lang.Object
-
- io.jenetics.engine.EvolutionInit<G>
-
- Type Parameters:
G
- the gene type
- All Implemented Interfaces:
Serializable
public final class EvolutionInit<G extends Gene<?,G>> extends Object implements Serializable
Represents the initialization value of an evolution stream/iterator.- Since:
- 4.1
- Version:
- 6.0
- Author:
- Franz Wilhelmstötter
- See Also:
EvolutionStart
,EvolutionStreamable.stream(EvolutionInit)
, Serialized Form- Implementation Note:
- This class is immutable and thread-safe.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
long
generation()
Return the generation of the start population.int
hashCode()
static <G extends Gene<?,G>>
EvolutionInit<G>of(ISeq<Genotype<G>> population, long generation)
Create a new evolution start object with the given population and for the given generation.ISeq<Genotype<G>>
population()
Return the initial population.String
toString()
-
-
-
Method Detail
-
population
public ISeq<Genotype<G>> population()
Return the initial population.- Returns:
- the initial population
-
generation
public long generation()
Return the generation of the start population.- Returns:
- the start generation
-
of
public static <G extends Gene<?,G>> EvolutionInit<G> of(ISeq<Genotype<G>> population, long generation)
Create a new evolution start object with the given population and for the given generation.- Type Parameters:
G
- the gene 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
-
-