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:
EvolutionResult
,EvolutionInit
,EvolutionStreamable.stream(EvolutionStart)
, 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 static <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
equals(Object obj)
long
generation()
Return the generation of the start population.int
hashCode()
static <G extends Gene<?,G>,C extends Comparable<? super C>>
EvolutionStart<G,C>of(ISeq<Phenotype<G,C>> population, long generation)
Create a new evolution start object with the given population and for the given generation.ISeq<Phenotype<G,C>>
population()
Return the population before the evolution step.String
toString()
-
-
-
Method Detail
-
population
public ISeq<Phenotype<G,C>> population()
Return the population before the evolution step.- Returns:
- the start population
-
generation
public long generation()
Return the generation of the start population.- Returns:
- the start generation
-
of
public static <G extends Gene<?,G>,C extends Comparable<? super C>> EvolutionStart<G,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
public static <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. 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
-
-