Catalano.Evolutionary.Genetic.Chromosome
Class FloatChromosome
- java.lang.Object
-
- Catalano.Evolutionary.Genetic.Chromosome.ChromosomeBase
-
- Catalano.Evolutionary.Genetic.Chromosome.FloatChromosome
-
- All Implemented Interfaces:
- IChromosome, java.lang.Cloneable, java.lang.Comparable
public class FloatChromosome extends ChromosomeBase
Float Chromosome.
-
-
Constructor Summary
Constructors Constructor and Description FloatChromosome(float[] values, float minValue, float maxValue)Initializes a new instance of the DoubleChromosome class.FloatChromosome(int size, float minValue, float maxValue)Initializes a new instance of the DoubleChromosome class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IChromosomeClone()IChromosomeCreateNew()voidGenerate()float[]getData()Get values.java.lang.ObjectgetGene(int index)intgetLength()floatgetMaxValue()Get maximum value.floatgetMinValue()Get minimum value.voidsetGene(int index, java.lang.Object gene)java.lang.StringtoString()-
Methods inherited from class Catalano.Evolutionary.Genetic.Chromosome.ChromosomeBase
compareTo, Evaluate, getFitness
-
-
-
-
Constructor Detail
-
FloatChromosome
public FloatChromosome(float[] values, float minValue, float maxValue)Initializes a new instance of the DoubleChromosome class.- Parameters:
values- Values.minValue- Minimum value.maxValue- Maximum value.
-
FloatChromosome
public FloatChromosome(int size, float minValue, float maxValue)Initializes a new instance of the DoubleChromosome class.- Parameters:
size- Size of the chromosome.minValue- Minimum value.maxValue- Maximum value.
-
-
Method Detail
-
getMinValue
public float getMinValue()
Get minimum value.- Returns:
- Minimum value.
-
getMaxValue
public float getMaxValue()
Get maximum value.- Returns:
- Maximum value.
-
getData
public float[] getData()
Get values.- Returns:
- Values.
-
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
-
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
-
getLength
public int getLength()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG