Package ec.gp
Class GPTreeConstraints
java.lang.Object
ec.gp.GPTreeConstraints
- All Implemented Interfaces:
Clique,Setup,Serializable
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) |
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionbyteThe byte value of the constraints -- we can only have 256 of themThe function set for nodes in the treeThe builder for the treestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intThe type of the root of the tree -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GPTreeConstraintsconstraintsFor(String constraintsName, EvolutionState state) You must guarantee that after calling constraintsFor(...) one or several times, you call state.output.exitIfErrors() once.voidsetup(EvolutionState state, Parameter base) This must be called after the GPTypes and GPFunctionSets have been set up.toString()
-
Field Details
-
SIZE_OF_BYTE
public static final int SIZE_OF_BYTE- See Also:
-
P_NAME
- See Also:
-
P_SIZE
- See Also:
-
P_INIT
- See Also:
-
P_RETURNS
- See Also:
-
P_FUNCTIONSET
- See Also:
-
name
-
constraintNumber
public byte constraintNumberThe byte value of the constraints -- we can only have 256 of them -
init
The builder for the tree -
treetype
The type of the root of the tree -
functionset
The function set for nodes in the tree
-
-
Constructor Details
-
GPTreeConstraints
public GPTreeConstraints()
-
-
Method Details
-
toString
-
setup
This must be called after the GPTypes and GPFunctionSets have been set up. -
constraintsFor
You must guarantee that after calling constraintsFor(...) one or several times, you call state.output.exitIfErrors() once.
-