Mapper
Class ContextualDerivationTree
java.lang.Object
Util.Structures.NimbleTree<Symbol>
Mapper.DerivationTree
Mapper.ContextualDerivationTree
- All Implemented Interfaces:
- Derivation
public class ContextualDerivationTree
- extends DerivationTree
This class is used for building a genotype to phenotype mapping
it also stores information on which codons affect structural or
nodal grammar rules, for a more selective mutation
- Author:
- jbyrne
Method Summary |
java.util.ArrayList<java.lang.Integer> |
getNodeCodonList()
this vector contains the index of every nodal codon. |
java.util.ArrayList<java.lang.Integer> |
getStructCodonList()
this vector contains the index of every structural codon. |
protected boolean |
growNode(DerivationNode t)
Grows the nodes of the tree in a recursive procedure. |
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 |
ContextualDerivationTree
public ContextualDerivationTree(GEGrammar gram,
GEChromosome gen)
ContextualDerivationTree
public ContextualDerivationTree(ContextualDerivationTree copy)
- Copy Constructor
- Parameters:
copy
- Contextual Derivation Tree to copy
growNode
protected boolean growNode(DerivationNode t)
- Grows the nodes of the tree in a recursive procedure. It also records
which nodes are structural or nodal
- Overrides:
growNode
in class DerivationTree
- Parameters:
t
- start node
- Returns:
- validity of growth
getStructCodonList
public java.util.ArrayList<java.lang.Integer> getStructCodonList()
- this vector contains the index of every structural codon.
- Returns:
- a vector of index values
getNodeCodonList
public java.util.ArrayList<java.lang.Integer> getNodeCodonList()
- this vector contains the index of every nodal codon.
- Returns:
- a vector of index values