|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectevolution.Chromosome
public class Chromosome
Chromosome with bit representation
Constructor Summary | |
---|---|
Chromosome(int chromosomeSize,
double crossOverProbability,
FitnessFunctionModel fitnessFunction,
GeneToStringModel toStringFunction,
java.lang.Object[] geneTypes)
Creates a new instance of Chromosome |
|
Chromosome(int chromosomeSize,
FitnessFunctionModel fitnessFunction,
GeneToStringModel toStringFunction,
java.lang.Object[] geneTypes)
Creates a new instance of Chromosome |
Method Summary | |
---|---|
java.lang.Object |
clone()
Return copy of the chromosome |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this network. |
int |
geneMutation(int geneNumber)
Mutant gene specified by genNumber. |
int |
getChromosomeSize()
Return size of the chromosome |
double |
getCrossOverProbability()
Return cross over propability |
FitnessFunctionModel |
getFitnessFunciton()
Return reference to fitness function |
double |
getFitnessValue()
Return fitness value of the chromosome |
java.lang.Object |
getGene(int geneNumber)
Return gene for with specified gene NUmber |
double |
getMutationProbability()
Return mutation propability |
void |
setCrossOverProbability(double crossOverProbality)
Set propability of cross over |
void |
setFitnessFunciton(FitnessFunctionModel fitnessFunction)
Set fitness function |
void |
setGene(int geneNumber,
java.lang.Object value)
Set gene with specified value |
void |
setMutationProbability(double mutationProbability)
Set mutation probability |
java.lang.String |
toString()
Return string representation of the chromosome |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Chromosome(int chromosomeSize, FitnessFunctionModel fitnessFunction, GeneToStringModel toStringFunction, java.lang.Object[] geneTypes)
chromosomeSize
- size of chromosomefitnessFunction
- reference to fitness functiontoStringFunction
- Reference to toStringFunctiongeneTypes
- Array of gene typespublic Chromosome(int chromosomeSize, double crossOverProbability, FitnessFunctionModel fitnessFunction, GeneToStringModel toStringFunction, java.lang.Object[] geneTypes)
chromosomeSize
- chromosome sizecrossOverProbability
- cross over propabilityfitnessFunction
- reference to fitness functiontoStringFunction
- Reference to toStringFunctiongeneTypes
- Array of gene typesMethod Detail |
---|
public void setMutationProbability(double mutationProbability)
setMutationProbability
in interface ChromosomeModel
mutationProbability
- Mutation propabilitypublic void setGene(int geneNumber, java.lang.Object value)
setGene
in interface ChromosomeModel
geneNumber
- Gene numbervalue
- Gene valuepublic double getMutationProbability()
getMutationProbability
in interface ChromosomeModel
public java.lang.Object getGene(int geneNumber)
getGene
in interface ChromosomeModel
geneNumber
- Gene number
public double getCrossOverProbability()
getCrossOverProbability
in interface ChromosomeModel
public void setCrossOverProbability(double crossOverProbality)
setCrossOverProbability
in interface ChromosomeModel
crossOverProbality
- cross over propabilitypublic void setFitnessFunciton(FitnessFunctionModel fitnessFunction)
setFitnessFunciton
in interface ChromosomeModel
fitnessFunction
- referenct to fitness functionpublic FitnessFunctionModel getFitnessFunciton()
getFitnessFunciton
in interface ChromosomeModel
FitnessFunctionModel
public int getChromosomeSize()
getChromosomeSize
in interface ChromosomeModel
public int geneMutation(int geneNumber)
geneMutation
in interface ChromosomeModel
geneNumber
- gene Number
public double getFitnessValue()
getFitnessValue
in interface ChromosomeModel
public java.lang.String toString()
toString
in interface ChromosomeModel
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface ChromosomeModel
equals
in class java.lang.Object
obj
- the reference object to compare with
public java.lang.Object clone()
clone
in interface ChromosomeModel
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |