Package ec.gp.build
Class RandTree
java.lang.Object
ec.gp.GPNodeBuilder
ec.gp.build.RandTree
- All Implemented Interfaces:
Prototype,Setup,Serializable,Cloneable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class ec.gp.GPNodeBuilder
CHECK_BOUNDARY, maxSize, minSize, NOSIZEGIVEN, P_MAXSIZE, P_MINSIZE, P_NUMSIZES, P_SIZE, sizeDistribution -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildDyckWord(int requestedSize, int[] arities, int[] s, EvolutionState state, int thread) booleancheckDyckWord(String dyck) Returns the default base for this prototype.newRootedTree(EvolutionState state, GPType type, int thread, GPNodeParent parent, GPFunctionSet set, int argposition, int requestedSize) voidsetup(EvolutionState state, Parameter base) Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.voidsetupArities(EvolutionState state, GPFunctionSet set) Methods inherited from class ec.gp.GPNodeBuilder
canPick, clone, errorAboutNoNodeWithType, pickSize, warnAboutNonterminal, warnAboutNonTerminalWithType, warnAboutNoTerminalWithType
-
Field Details
-
P_RANDOMBRANCH
- See Also:
-
-
Constructor Details
-
RandTree
public RandTree()
-
-
Method Details
-
defaultBase
Description copied from interface:PrototypeReturns the default base for this prototype. This should generally be implemented by building off of the static base() method on the DefaultsForm object for the prototype's package. This should be callable during setup(...). -
setup
Description copied from interface:PrototypeSets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.For 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.
-
setupArities
-
newRootedTree
public GPNode newRootedTree(EvolutionState state, GPType type, int thread, GPNodeParent parent, GPFunctionSet set, int argposition, int requestedSize) - Specified by:
newRootedTreein classGPNodeBuilder
-
buildDyckWord
public String buildDyckWord(int requestedSize, int[] arities, int[] s, EvolutionState state, int thread) -
checkDyckWord
-