|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.genetics.Chromosome
org.apache.commons.math.genetics.AbstractListChromosome<T>
T
- type of the representation listpublic abstract class AbstractListChromosome<T>
Chromosome represented by an immutable list of a fixed length.
Constructor Summary | |
---|---|
AbstractListChromosome(List<T> representation)
Constructor. |
|
AbstractListChromosome(T[] representation)
Constructor. |
Method Summary | |
---|---|
int |
getLength()
Returns the length of the chromosome. |
abstract AbstractListChromosome<T> |
newFixedLengthChromosome(List<T> chromosomeRepresentation)
Creates a new instance of the same class as this is, with a
given arrayRepresentation . |
String |
toString()
|
Methods inherited from class org.apache.commons.math.genetics.Chromosome |
---|
compareTo, getFitness, searchForFitnessUpdate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.commons.math.genetics.Fitness |
---|
fitness |
Constructor Detail |
---|
public AbstractListChromosome(List<T> representation)
representation
- inner representation of the chromosomepublic AbstractListChromosome(T[] representation)
representation
- inner representation of the chromosomeMethod Detail |
---|
public int getLength()
public abstract AbstractListChromosome<T> newFixedLengthChromosome(List<T> chromosomeRepresentation)
this
is, with a
given arrayRepresentation
. This is needed in crossover and
mutation operators, where we need a new instance of the same class, but
with different array representation.
Usually, this method just calls a constructor of the class.
chromosomeRepresentation
- the inner array representation of the new chromosome.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |