Interface Chromosome
-
- All Superinterfaces:
Comparable<Chromosome>
- All Known Implementing Classes:
Best2Bin.DeBest2BinCell
,ConstrainedCellFactory.ConstrainedCell
,DEOptimCellFactory.DeOptimCell
,LocalSearchCellFactory.LocalSearchCell
,Rand1Bin.DeRand1BinCell
,RealScalarFunctionChromosome
,SimpleCellFactory.SimpleCell
public interface Chromosome extends Comparable<Chromosome>
A chromosome is a representation of a solution to an optimization problem. A genetic algorithm creates new chromosomes from existing ones by taking parts and combine them in new ways. As a genetic algorithm usually runs in a multi-core environment for performance, it is important to ensure that an implementation of the chromosome operations are thread-safe and can run in parallel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Chromosome
crossover(Chromosome that)
Construct aChromosome
by crossing over a pair of chromosomes.double
fitness()
This is the fitness to determine how good this chromosome is.Chromosome
mutate()
Construct aChromosome
by mutation.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
fitness
double fitness()
This is the fitness to determine how good this chromosome is.- Returns:
- the fitness
-
mutate
Chromosome mutate()
Construct aChromosome
by mutation.- Returns:
- a mutated chromosome
-
crossover
Chromosome crossover(Chromosome that)
Construct aChromosome
by crossing over a pair of chromosomes.- Parameters:
that
- another chromosome- Returns:
- a crossed over chromosome
-
-