|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectUtil.Structures.NimbleTree<Symbol>
Mapper.DerivationTree
public class DerivationTree
This class is used in the mapping from genotype to phenotype in GE.
Field Summary | |
---|---|
protected int |
currentCodonValue
|
protected int |
geneCnt
|
protected IntIterator |
genIter
|
protected GEChromosome |
genny
|
protected GEGrammar |
grammy
|
protected int |
wrapCount
|
Constructor Summary | |
---|---|
DerivationTree(DerivationTree copy)
Copy Constructor |
|
DerivationTree(GEGrammar gram,
GEChromosome gen)
Create new Derivation Tree |
Method Summary | |
---|---|
boolean |
buildDerivationTree()
Build a derivation tree. |
boolean |
derive()
|
protected java.lang.String |
getGECodonValue(java.lang.String s,
int codon)
Extract range for value from non-terminal specification, where specification is in the format |
int |
getGeneCnt()
Get the input used, called genes |
int |
getWrapCount()
Get the number of wraps used |
protected boolean |
growNode(DerivationNode t)
Grows the nodes of the tree in a recursive procedure. |
protected TreeNode<Symbol> |
newNode()
|
void |
setWrapCount(int wrapCount)
Set the number of wraps used |
Methods inherited from class Util.Structures.NimbleTree |
---|
addChild, depthFirstTraversal, getAncestorChain, getAncestorChains, getBranchLengths, getBranchLengths, getCurrentLevel, getCurrentNode, getDepth, getMaxStackSize, getNodeCount, getRoot, getRootToLeafPaths, makeTreeOverStringFromSExpression, populateStack, setCurrentLevel, setCurrentNode, setDepth, setMaxStackSize, setNodeCount, setRoot, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final GEGrammar grammy
protected final GEChromosome genny
protected int wrapCount
protected IntIterator genIter
protected int geneCnt
protected int currentCodonValue
Constructor Detail |
---|
public DerivationTree(GEGrammar gram, GEChromosome gen)
gram
- mappergen
- inputpublic DerivationTree(DerivationTree copy)
copy
- Derivation Tree to copyMethod Detail |
---|
protected TreeNode<Symbol> newNode()
newNode
in class NimbleTree<Symbol>
public boolean buildDerivationTree()
protected java.lang.String getGECodonValue(java.lang.String s, int codon) throws MalformedGrammarException
s
- symbol stringcodon
- codon value
MalformedGrammarException
- The specification s is malformedprotected boolean growNode(DerivationNode t)
t
- start node
public int getWrapCount()
public void setWrapCount(int wrapCount)
wrapCount
- The number of wraps usedpublic int getGeneCnt()
public boolean derive()
derive
in interface Derivation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |