|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object evolution.Gene
public class Gene
Gene
Constructor Summary | |
---|---|
Gene(java.lang.Object[] geneTypes,
GeneToStringModel toStringFunction)
Creates a new instance of Gene |
Method Summary | |
---|---|
java.lang.Object |
clone()
Create and return a copy of this gene |
java.lang.Object[] |
getGeneTypes()
Return array of gene types |
java.lang.Object |
getGeneValue()
Return gene value |
double |
getMutationProbability()
Return mutation propability |
int |
getNumberOfTypes()
Return number of gene types. |
GeneToStringModel |
getToStringFunction()
Return reference to function used for generating String representaion of the gene |
int |
mutation()
Mutate the gene. |
void |
setGene(java.lang.Object value)
Set gene value with Object. |
void |
setGeneValue(int index)
Set gene value for specified type from list of types |
void |
setMutationProbability(double mutationProbability)
Set mutation propability |
void |
setToStringFunction(GeneToStringModel toStringFunction)
Set function used for generating String representaion of the gene |
java.lang.String |
toString()
Return String representation of the gene using GeneToStingFunction . |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Gene(java.lang.Object[] geneTypes, GeneToStringModel toStringFunction)
geneTypes
- Array of gene typestoStringFunction
- Reference to GeneToStringFunctionMethod Detail |
---|
public void setMutationProbability(double mutationProbability)
mutationProbability
- Set propability of the genepublic double getMutationProbability()
public void setGene(java.lang.Object value)
value
- New gene valuepublic void setGeneValue(int index)
index
- Index of gene typepublic java.lang.Object[] getGeneTypes()
public java.lang.Object getGeneValue()
public int getNumberOfTypes()
public int mutation()
public java.lang.String toString()
toString
in class java.lang.Object
GeneToStringModel
public void setToStringFunction(GeneToStringModel toStringFunction)
toStringFunction
- Reference to functionpublic GeneToStringModel getToStringFunction()
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |