public class RandTree extends GPNodeBuilder
| Modifier and Type | Class and Description |
|---|---|
static class |
RandTree.ArityObject |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
P_RANDOMBRANCH |
CHECK_BOUNDARY, maxSize, minSize, NOSIZEGIVEN, P_MAXSIZE, P_MINSIZE, P_NUMSIZES, P_SIZE, sizeDistribution| Constructor and Description |
|---|
RandTree() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
buildDyckWord(int requestedSize,
int[] arities,
int[] s,
EvolutionState state,
int thread) |
boolean |
checkDyckWord(java.lang.String dyck) |
Parameter |
defaultBase()
Returns the default base for this prototype.
|
GPNode |
newRootedTree(EvolutionState state,
GPType type,
int thread,
GPNodeParent parent,
GPFunctionSet set,
int argposition,
int requestedSize) |
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored
in state, built off of the parameter base base.
|
void |
setupArities(EvolutionState state,
GPFunctionSet set) |
canPick, clone, errorAboutNoNodeWithType, pickSize, warnAboutNonterminal, warnAboutNonTerminalWithType, warnAboutNoTerminalWithTypepublic static final java.lang.String P_RANDOMBRANCH
public Parameter defaultBase()
Prototypepublic void setup(EvolutionState state, Parameter base)
PrototypeFor prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.
public void setupArities(EvolutionState state, GPFunctionSet set)
public GPNode newRootedTree(EvolutionState state, GPType type, int thread, GPNodeParent parent, GPFunctionSet set, int argposition, int requestedSize)
newRootedTree in class GPNodeBuilderpublic java.lang.String buildDyckWord(int requestedSize,
int[] arities,
int[] s,
EvolutionState state,
int thread)
public boolean checkDyckWord(java.lang.String dyck)