|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.artoflife.gp.genome.GpTreeNode | +--org.artoflife.gp.genome.bool.BooleanGene
Represents a boolean value, mutated with
BooleanMutator
).
Constructor Summary | |
BooleanGene()
|
Method Summary | |
java.lang.Object |
clone()
Return a clone of this . |
java.lang.Object |
evaluate(Phenotype phenotype)
Evaluate this expression in the context of the passed Phenotype . |
protected java.util.SortedMap |
getMutators()
Provides a SortedMap of GpMutator s with their
probabilities (Doubles between 0.0 and 1.0)
so that #mutate(float)
can choose one to do a mutation. |
protected java.util.List |
getParameterClasses()
|
GpTreeNode |
getParameterGene(int index)
|
java.lang.Class |
getReturnClass()
|
java.lang.Boolean |
getValue()
|
void |
setParameterGene(int index,
GpTreeNode gene)
|
void |
setValue(java.lang.Boolean value)
|
java.lang.String |
toString()
|
Methods inherited from class org.artoflife.gp.genome.GpTreeNode |
getParameterClass, getParametersLength, getSize, mutate |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BooleanGene()
Method Detail |
public java.lang.Object clone()
GpTreeNode
this
. Override to
deep clone any non-primitive fields in subclasses.
clone
in class GpTreeNode
public void setValue(java.lang.Boolean value)
public java.lang.Boolean getValue()
public java.lang.Object evaluate(Phenotype phenotype)
GpTreeNode
Phenotype
.
evaluate
in class GpTreeNode
GpTreeNode.evaluate(org.artoflife.gp.Phenotype)
public java.lang.Class getReturnClass()
getReturnClass
in class GpTreeNode
GpTreeNode.getReturnClass()
public java.lang.String toString()
toString
in class java.lang.Object
protected java.util.SortedMap getMutators()
GpTreeNode
GpMutator
s with their
probabilities (Doubles between 0.0 and 1.0)
so that #mutate(float)
can choose one to do a mutation. The map
needs to look like:
Load from configuration properties.
[getClass().getName()].mutator.class.0
and optionally
[getClass().getName()].mutator.probability.0
using:
Configuration.getInstance().getInstancesProbabilities(getClass().getName() + ".mutator");
getMutators
in class GpTreeNode
GpTreeNode.getMutators()
protected java.util.List getParameterClasses()
getParameterClasses
in class GpTreeNode
GpTreeNode.getParameterClasses()
public GpTreeNode getParameterGene(int index)
getParameterGene
in class GpTreeNode
GpTreeNode.getParameterGene(int)
public void setParameterGene(int index, GpTreeNode gene)
setParameterGene
in class GpTreeNode
index
- the index of the gene to replacegene
- the gene to replace withGpTreeNode.setParameterGene(int, GpTreeNode)
|
artoflife pre0.1.0-dev | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |