public final class PermutationChromosome<T> extends AbstractChromosome<EnumGene<T>> implements XMLSerializable
AbstractChromosome has been overridden so
that no invalid permutation will be created._genes, _valid| Constructor and Description |
|---|
PermutationChromosome(ISeq<? extends T> validAlleles)
Create a new, random chromosome with the given valid alleles.
|
| Modifier and Type | Method and Description |
|---|---|
Factory<PermutationChromosome<T>> |
asFactory()
Deprecated.
No longer needed after adding new factory methods to the
Array class. |
boolean |
equals(Object obj) |
ISeq<T> |
getValidAlleles() |
int |
hashCode() |
boolean |
isValid()
Check if this chromosome represents still a valid permutation.
|
PermutationChromosome<T> |
newInstance()
Create a new, random chromosome.
|
PermutationChromosome<T> |
newInstance(ISeq<EnumGene<T>> genes)
A factory method which creates a new
Chromosome of specific type
and the given genes. |
static PermutationChromosome<Integer> |
ofInteger(int length)
Create a integer permutation chromosome with the given length.
|
String |
toString() |
static <T> PermutationChromosome<T> |
valueOf(ISeq<EnumGene<T>> genes)
Create a new PermutationChromosome from the given genes.
|
public PermutationChromosome(ISeq<? extends T> validAlleles)
validAlleles - the valid alleles used for this permutation arrays.public ISeq<T> getValidAlleles()
public boolean isValid()
isValid in interface VerifiableisValid in class AbstractChromosome<EnumGene<T>>@Deprecated public Factory<PermutationChromosome<T>> asFactory()
Array class.public PermutationChromosome<T> newInstance()
newInstance in interface Factory<Chromosome<EnumGene<T>>>public PermutationChromosome<T> newInstance(ISeq<EnumGene<T>> genes)
ChromosomeChromosome of specific type
and the given genes.newInstance in interface Chromosome<EnumGene<T>>genes - the genes of the new chromosome. The given genes array is
not copied.Chromosome of the same type with the given genes.public int hashCode()
hashCode in class AbstractChromosome<EnumGene<T>>public static <T> PermutationChromosome<T> valueOf(ISeq<EnumGene<T>> genes)
genes - the genes of this chromosome.public static PermutationChromosome<Integer> ofInteger(int length)
length - the chromosome length.© 2007-2013 Franz Wilhelmstötter (2013-12-18 20:17)