ec.gp.koza
Class KozaBuilder

java.lang.Object
  extended by ec.gp.GPNodeBuilder
      extended by ec.gp.koza.KozaBuilder
All Implemented Interfaces:
Prototype, Setup, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
FullBuilder, GrowBuilder, HalfBuilder

public abstract class KozaBuilder
extends GPNodeBuilder

See Also:
Serialized Form

Field Summary
 int maxDepth
          The largest maximum tree depth RAMPED HALF-AND-HALF can specify.
 int minDepth
          The smallest maximum tree depth RAMPED HALF-AND-HALF can specify.
static java.lang.String P_MAXDEPTH
           
static java.lang.String P_MINDEPTH
           
 
Fields inherited from class ec.gp.GPNodeBuilder
CHECK_BOUNDARY, maxSize, minSize, NOSIZEGIVEN, P_MAXSIZE, P_MINSIZE, P_NUMSIZES, P_SIZE, sizeDistribution
 
Constructor Summary
KozaBuilder()
           
 
Method Summary
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(...)
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(...)
 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.
 
Methods inherited from class ec.gp.GPNodeBuilder
canPick, clone, errorAboutNoNodeWithType, newRootedTree, pickSize, warnAboutNonterminal, warnAboutNonTerminalWithType, warnAboutNoTerminalWithType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ec.Prototype
defaultBase
 

Field Detail

P_MAXDEPTH

public static final java.lang.String P_MAXDEPTH
See Also:
Constant Field Values

P_MINDEPTH

public static final java.lang.String P_MINDEPTH
See Also:
Constant Field Values

maxDepth

public int maxDepth
The largest maximum tree depth RAMPED HALF-AND-HALF can specify.


minDepth

public int minDepth
The smallest maximum tree depth RAMPED HALF-AND-HALF can specify.

Constructor Detail

KozaBuilder

public KozaBuilder()
Method Detail

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from interface: Prototype
Sets 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.

Specified by:
setup in interface Prototype
Specified by:
setup in interface Setup
Overrides:
setup in class GPNodeBuilder

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(...)