Module io.jenetics.base
Package io.jenetics.engine
Interface Evolution<G extends Gene<?,G>,C extends Comparable<? super C>>
- Type Parameters:
G
- the gene typeC
- the fitness result type
- All Known Implementing Classes:
Engine
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface Evolution<G extends Gene<?,G>,C extends Comparable<? super C>>
This functional interface defines the evolution function, which takes an
EvolutionStart
object, evolves the population, and returns an
EvolutionResult
object.- Since:
- 5.1
- Version:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptionevolve
(EvolutionStart<G, C> start) Perform one evolution step with the given evolutionstart
object New phenotypes are created with the fitness function defined by this enginedefault EvolutionResult
<G, C> Perform one evolution step with the givenpopulation
andgeneration
.
-
Method Details
-
evolve
Perform one evolution step with the given evolutionstart
object New phenotypes are created with the fitness function defined by this engine- Parameters:
start
- the evolution start object- Returns:
- the evolution result
- Throws:
NullPointerException
- if the given evolutionstart
isnull
- Since:
- 3.1
- See Also:
- API Note:
- The implementation of this method must be thread-safe.
-
evolve
Perform one evolution step with the givenpopulation
andgeneration
.This method is thread-safe.
- Parameters:
population
- the population to evolvegeneration
- the current generation; used for calculating the phenotype age.- Returns:
- the evolution result
- Throws:
NullPointerException
- if the givenpopulation
isnull
IllegalArgumentException
- if the givengeneration
is smaller then one- See Also:
-