|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ec.gp.GPTreeConstraints
A GPTreeConstraints is a Clique which defines constraint information common to many different GPTree trees, namely the tree type, builder, and function set. GPTreeConstraints have unique names by which they are identified.
In adding new things to GPTreeConstraints, you should ask yourself the following questions: first, is this something that takes up too much memory to store in GPTrees themseves? second, is this something that needs to be accessed very rapidly, so cannot be implemented as a method call in a GPTree? third, can this be shared among different GPTrees?
Parameters
base.size int >= 1 |
(number of tree constraints) |
base.n.name String |
(name of tree constraint n) |
base.n.init classname, inherits and != ec.gp.GPNodeBuilder |
(GP node builder for tree constraint n) |
base.n.returns String |
(tree type for tree constraint n) |
base.n.fset String |
(function set for tree constraint n) |
Field Summary | |
static java.util.Hashtable |
all
A reposiory of all the GPTreeConstraints in the system. |
byte |
constraintNumber
The byte value of the constraints -- we can only have 256 of them |
static GPTreeConstraints[] |
constraints
|
GPFunctionSet |
functionset
The function set for nodes in the tree |
GPNodeBuilder |
init
The builder for the tree |
java.lang.String |
name
|
static byte |
numConstraints
|
static java.lang.String |
P_FUNCTIONSET
|
static java.lang.String |
P_INIT
|
static java.lang.String |
P_NAME
|
static java.lang.String |
P_RETURNS
|
static java.lang.String |
P_SIZE
|
static int |
SIZE_OF_BYTE
|
GPType |
treetype
The type of the root of the tree |
Constructor Summary | |
GPTreeConstraints()
|
Method Summary | |
static GPTreeConstraints |
constraintsFor(java.lang.String constraintsName,
EvolutionState state)
You must guarantee that after calling constraintsFor(...) one or several times, you call state.output.exitIfErrors() once. |
void |
setup(EvolutionState state,
Parameter base)
This must be called after the GPTypes and GPFunctionSets have been set up. |
static void |
setupConstraints(EvolutionState state,
Parameter base)
Sets up all the GPTreeConstraints, loading them from the parameter file. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SIZE_OF_BYTE
public static final java.lang.String P_NAME
public static final java.lang.String P_SIZE
public static final java.lang.String P_INIT
public static final java.lang.String P_RETURNS
public static final java.lang.String P_FUNCTIONSET
public java.lang.String name
public byte constraintNumber
public GPNodeBuilder init
public GPType treetype
public GPFunctionSet functionset
public static java.util.Hashtable all
public static GPTreeConstraints[] constraints
public static byte numConstraints
Constructor Detail |
public GPTreeConstraints()
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public static void setupConstraints(EvolutionState state, Parameter base)
public final void setup(EvolutionState state, Parameter base)
setup
in interface Setup
public static GPTreeConstraints constraintsFor(java.lang.String constraintsName, EvolutionState state)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |