public class GPFunctionSet extends java.lang.Object implements Clique
Parameters
base.name String |
(name of function set. Must be different from other function set instances) |
base.size int >= 1 |
(number of functions in the function set) |
base.func.n classname, inherits and != ec.gp.GPNode |
(class of function node n in the set) |
Parameter bases
base.func.n | function node n |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
name
Name of the GPFunctionSet
|
GPNode[][] |
nodes
The nodes that our GPTree can use: nodes[type][thenodes].
|
java.util.Hashtable |
nodes_h
The nodes that our GPTree can use: arrays of nodes hashed by type.
|
GPNode[][][] |
nodesByArity
Nodes == a given arity, that is: nodesByArity[type][arity][thenodes]
|
java.util.Hashtable |
nodesByName
The nodes that our GPTree can use, hashed by name().
|
GPNode[][] |
nonterminals
The nonterminals our GPTree can use: nonterminals[type][thenodes].
|
java.util.Hashtable |
nonterminals_h
The nonterminals our GPTree can use: arrays of nonterminals hashed by type.
|
GPNode[][][] |
nonterminalsOverArity
Nonterminals >= a given arity, that is: nonterminalsOverArity[type][arity][thenodes] --
this will be O(n^2).
|
GPNode[][][] |
nonterminalsUnderArity
Nonterminals <= a given arity, that is: nonterminalsUnderArity[type][arity][thenodes] --
this will be O(n^2).
|
static java.lang.String |
P_FUNC |
static java.lang.String |
P_NAME |
static java.lang.String |
P_SIZE |
GPNode[][] |
terminals
The terminals our GPTree can use: terminals[type][thenodes].
|
java.util.Hashtable |
terminals_h
The terminals our GPTree can use: arrays of terminals hashed by type.
|
Constructor and Description |
---|
GPFunctionSet() |
Modifier and Type | Method and Description |
---|---|
static GPFunctionSet |
functionSetFor(java.lang.String functionSetName,
EvolutionState state)
Returns the function set for a given name.
|
void |
postProcessFunctionSet()
Sets up the arrays based on the hashtables
|
void |
setup(EvolutionState state,
Parameter base)
Must be done after GPType and GPNodeConstraints have been set up
|
java.lang.String |
toString()
Returns the name.
|
public static final java.lang.String P_NAME
public static final java.lang.String P_FUNC
public static final java.lang.String P_SIZE
public java.lang.String name
public java.util.Hashtable nodes_h
public GPNode[][] nodes
public java.util.Hashtable nonterminals_h
public GPNode[][] nonterminals
public java.util.Hashtable terminals_h
public GPNode[][] terminals
public java.util.Hashtable nodesByName
public GPNode[][][] nodesByArity
public GPNode[][][] nonterminalsUnderArity
public GPNode[][][] nonterminalsOverArity
public java.lang.String toString()
toString
in class java.lang.Object
public void postProcessFunctionSet()
public void setup(EvolutionState state, Parameter base)
public static GPFunctionSet functionSetFor(java.lang.String functionSetName, EvolutionState state)