public class RandTree extends GPNodeBuilder
| Modifier and Type | Class and Description |
|---|---|
static class |
RandTree.ArityObject |
| Modifier and Type | Field and Description |
|---|---|
(package private) int[] |
arities |
(package private) boolean |
aritySetupDone |
static String |
P_RANDOMBRANCH |
(package private) LinkedList |
permutations |
CHECK_BOUNDARY, maxSize, minSize, NOSIZEGIVEN, P_MAXSIZE, P_MINSIZE, P_NUMSIZES, P_SIZE, sizeDistribution| Constructor and Description |
|---|
RandTree() |
| Modifier and Type | Method and Description |
|---|---|
String |
buildDyckWord(int requestedSize,
int[] arities,
int[] s,
EvolutionState state,
int thread) |
(package private) GPNode |
buildTree(EvolutionState state,
int thread,
GPNodeParent parent,
int argposition,
GPFunctionSet set,
String dyckWord) |
boolean |
checkDyckWord(String dyck) |
(package private) boolean |
contains(LinkedList initArities,
int a) |
Parameter |
defaultBase()
Returns the default base for this prototype.
|
(package private) long |
fact(long num) |
GPNode |
newRootedTree(EvolutionState state,
GPType type,
int thread,
GPNodeParent parent,
GPFunctionSet set,
int argposition,
int requestedSize) |
(package private) void |
Permute(int current,
int[] sol,
int size) |
(package private) void |
remove(LinkedList initArities,
int a) |
(package private) int[] |
select(LinkedList permutations,
int size) |
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 String P_RANDOMBRANCH
int[] arities
boolean aritySetupDone
LinkedList permutations
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.
boolean contains(LinkedList initArities, int a)
void remove(LinkedList initArities, int a)
public void setupArities(EvolutionState state, GPFunctionSet set)
long fact(long num)
int[] select(LinkedList permutations, int size)
public GPNode newRootedTree(EvolutionState state, GPType type, int thread, GPNodeParent parent, GPFunctionSet set, int argposition, int requestedSize)
newRootedTree in class GPNodeBuildervoid Permute(int current,
int[] sol,
int size)
public String buildDyckWord(int requestedSize, int[] arities, int[] s, EvolutionState state, int thread)
public boolean checkDyckWord(String dyck)
GPNode buildTree(EvolutionState state, int thread, GPNodeParent parent, int argposition, GPFunctionSet set, String dyckWord)
Copyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.