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
See Also:
Implementation Note:
This class is immutable and thread-safe.
  • Method Details

    • 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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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 given population is null.
      IllegalArgumentException - if the given generation is smaller then one