Package evo.search.io.entities
Class Configuration.ConfigurationBuilder
- java.lang.Object
-
- evo.search.io.entities.Configuration.ConfigurationBuilder
-
- Enclosing class:
- Configuration
public static class Configuration.ConfigurationBuilder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Configuration.ConfigurationBuilder
alterers(List<? extends DiscreteAlterer> alterers)
List of alterers used during theEvolution
's mutation phase.Configuration
build()
Configuration.ConfigurationBuilder
chooseWithoutPermutation(boolean chooseWithoutPermutation)
State of whether to choose the distances in a permutation during the shuffle of new individuals.Configuration.ConfigurationBuilder
distanceMutationDelta(double distanceMutationDelta)
Value of maximum distance change during the mutation.Configuration.ConfigurationBuilder
distances(List<Double> distances)
Input distances to choose a permutation from.Configuration.ConfigurationBuilder
fitness(Evolution.Fitness fitness)
Fitness method used to evaluate the individuals.Configuration.ConfigurationBuilder
limit(int limit)
Last execution limit for the evolution method.Configuration.ConfigurationBuilder
name(String name)
The configurations name.Configuration.ConfigurationBuilder
offspring(int offspring)
Amount of offspring individuals.Configuration.ConfigurationBuilder
population(int population)
Population size.Configuration.ConfigurationBuilder
positions(int positions)
The amount of positions available for theDiscreteGene
s.Configuration.ConfigurationBuilder
selector(io.jenetics.Selector<DiscreteGene,Double> selector)
Selection method for offspring.String
toString()
Configuration.ConfigurationBuilder
treasures(List<DiscreteGene> treasures)
List of treasureDiscreteGene
s to search for.Configuration.ConfigurationBuilder
version(String version)
Version for configuration compatibility checks.
-
-
-
Method Detail
-
version
public Configuration.ConfigurationBuilder version(String version)
Version for configuration compatibility checks.- Returns:
this
.
-
name
public Configuration.ConfigurationBuilder name(String name)
The configurations name.- Returns:
this
.
-
limit
public Configuration.ConfigurationBuilder limit(int limit)
Last execution limit for the evolution method.- Returns:
this
.
-
positions
public Configuration.ConfigurationBuilder positions(int positions)
The amount of positions available for theDiscreteGene
s.- Returns:
this
.
-
distances
public Configuration.ConfigurationBuilder distances(List<Double> distances)
Input distances to choose a permutation from. Forms singleDiscreteGene
chromosomes.- Returns:
this
.
-
treasures
public Configuration.ConfigurationBuilder treasures(List<DiscreteGene> treasures)
List of treasureDiscreteGene
s to search for.- Returns:
this
.
-
fitness
public Configuration.ConfigurationBuilder fitness(Evolution.Fitness fitness)
Fitness method used to evaluate the individuals.- Returns:
this
.- See Also:
Evolution.Fitness
-
alterers
public Configuration.ConfigurationBuilder alterers(List<? extends DiscreteAlterer> alterers)
List of alterers used during theEvolution
's mutation phase.- Returns:
this
.
-
selector
public Configuration.ConfigurationBuilder selector(io.jenetics.Selector<DiscreteGene,Double> selector)
Selection method for offspring.- Returns:
this
.
-
offspring
public Configuration.ConfigurationBuilder offspring(int offspring)
Amount of offspring individuals. Has to be less or equal thanpopulation(int)
.- Returns:
this
.
-
population
public Configuration.ConfigurationBuilder population(int population)
Population size.- Returns:
this
.
-
chooseWithoutPermutation
public Configuration.ConfigurationBuilder chooseWithoutPermutation(boolean chooseWithoutPermutation)
State of whether to choose the distances in a permutation during the shuffle of new individuals.- Returns:
this
.- See Also:
DiscreteGene.newInstance()
-
distanceMutationDelta
public Configuration.ConfigurationBuilder distanceMutationDelta(double distanceMutationDelta)
Value of maximum distance change during the mutation.- Returns:
this
.- See Also:
DistanceMutator
-
build
public Configuration build()
-
-