Catalano.Evolutionary.Genetic.Chromosome
Class PermutationChromosome
- java.lang.Object
-
- Catalano.Evolutionary.Genetic.Chromosome.ChromosomeBase
-
- Catalano.Evolutionary.Genetic.Chromosome.PermutationChromosome
-
- All Implemented Interfaces:
- IChromosome, java.lang.Cloneable, java.lang.Comparable
public class PermutationChromosome extends ChromosomeBase
Permutation Chromosome.
-
-
Constructor Summary
Constructors Constructor and Description PermutationChromosome(int lenght)Initializes a new instance of the PermutationChromosome class.PermutationChromosome(int[] data)Initializes a new instance of the PermutationChromosome class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IChromosomeClone()IChromosomeCreateNew()voidGenerate()int[]getData()Get data.java.lang.ObjectgetGene(int index)intgetLength()voidsetGene(int index, java.lang.Object gene)java.lang.StringtoString()-
Methods inherited from class Catalano.Evolutionary.Genetic.Chromosome.ChromosomeBase
compareTo, Evaluate, getFitness
-
-
-
-
Constructor Detail
-
PermutationChromosome
public PermutationChromosome(int lenght)
Initializes a new instance of the PermutationChromosome class.- Parameters:
lenght- Length of the chromosome.
-
PermutationChromosome
public PermutationChromosome(int[] data)
Initializes a new instance of the PermutationChromosome class.- Parameters:
data- Data.
-
-
Method Detail
-
getLength
public int getLength()
-
getGene
public java.lang.Object getGene(int index)
- Specified by:
getGenein interfaceIChromosome- Specified by:
getGenein classChromosomeBase
-
setGene
public void setGene(int index, java.lang.Object gene)- Specified by:
setGenein interfaceIChromosome- Specified by:
setGenein classChromosomeBase
-
getData
public int[] getData()
Get data.- Returns:
- Data.
-
Generate
public void Generate()
- Specified by:
Generatein interfaceIChromosome- Specified by:
Generatein classChromosomeBase
-
CreateNew
public IChromosome CreateNew()
- Specified by:
CreateNewin interfaceIChromosome- Specified by:
CreateNewin classChromosomeBase
-
Clone
public IChromosome Clone()
- Specified by:
Clonein interfaceIChromosome- Specified by:
Clonein classChromosomeBase
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG