Package ec.gp.koza
Class KozaBuilder
java.lang.Object
ec.gp.GPNodeBuilder
ec.gp.koza.KozaBuilder
- All Implemented Interfaces:
Prototype,Setup,Serializable,Cloneable
- Direct Known Subclasses:
FullBuilder,GrowBuilder,HalfBuilder
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe largest maximum tree depth RAMPED HALF-AND-HALF can specify.intThe smallest maximum tree depth RAMPED HALF-AND-HALF can specify.static final Stringstatic final StringFields 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 TypeMethodDescriptionprotected GPNodefullNode(EvolutionState state, int current, int max, GPType type, int thread, GPNodeParent parent, int argposition, GPFunctionSet set) A private recursive method which builds a FULL-style tree for newRootedTree(...)protected GPNodegrowNode(EvolutionState state, int current, int max, GPType type, int thread, GPNodeParent parent, int argposition, GPFunctionSet set) A private function which recursively returns a GROW tree to newRootedTree(...)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.Methods inherited from class ec.gp.GPNodeBuilder
canPick, clone, errorAboutNoNodeWithType, newRootedTree, pickSize, warnAboutNonterminal, warnAboutNonTerminalWithType, warnAboutNoTerminalWithTypeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ec.Prototype
defaultBase
-
Field Details
-
P_MAXDEPTH
- See Also:
-
P_MINDEPTH
- See Also:
-
maxDepth
public int maxDepthThe largest maximum tree depth RAMPED HALF-AND-HALF can specify. -
minDepth
public int minDepthThe smallest maximum tree depth RAMPED HALF-AND-HALF can specify.
-
-
Constructor Details
-
KozaBuilder
public KozaBuilder()
-
-
Method Details
-
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.
-
fullNode
protected GPNode fullNode(EvolutionState state, int current, int max, GPType type, int thread, GPNodeParent parent, int argposition, GPFunctionSet set) A private recursive method which builds a FULL-style tree for newRootedTree(...) -
growNode
protected GPNode growNode(EvolutionState state, int current, int max, GPType type, int thread, GPNodeParent parent, int argposition, GPFunctionSet set) A private function which recursively returns a GROW tree to newRootedTree(...)
-