public interface Chromosome extends java.lang.Comparable<Chromosome>
Modifier and Type | Method and Description |
---|---|
Chromosome[] |
crossover(Chromosome another)
Returns a pair of offsprings by crossovering this one with another one
according to the crossover rate, which determines how often will be
crossover performed.
|
double |
fitness()
Returns the fitness of chromosome.
|
void |
mutate()
For genetic algorithms, this method mutates the chromosome randomly.
|
Chromosome |
newInstance()
Returns a new random instance.
|
double fitness()
Chromosome newInstance()
Chromosome[] crossover(Chromosome another)
void mutate()