public class GPFunctionSet extends 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 |
---|---|
String |
name
Name of the GPFunctionSet
|
GPNode[][] |
nodes
The nodes that our GPTree can use: nodes[type][thenodes].
|
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]
|
Hashtable |
nodesByName
The nodes that our GPTree can use, hashed by name().
|
GPNode[][] |
nonterminals
The nonterminals our GPTree can use: nonterminals[type][thenodes].
|
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 String |
P_FUNC |
static String |
P_NAME |
static String |
P_SIZE |
private static long |
serialVersionUID |
GPNode[][] |
terminals
The terminals our GPTree can use: terminals[type][thenodes].
|
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(String functionSetName,
EvolutionState state)
Returns the function set for a given name.
|
void |
postProcessFunctionSet()
Sets up the arrays based on the hashtables
|
private void |
readObject(ObjectInputStream in) |
void |
setup(EvolutionState state,
Parameter base)
Must be done after GPType and GPNodeConstraints have been set up
|
String |
toString()
Returns the name.
|
private void |
writeObject(ObjectOutputStream out) |
private static final long serialVersionUID
public static final String P_NAME
public static final String P_FUNC
public static final String P_SIZE
public String name
public Hashtable nodes_h
public GPNode[][] nodes
public Hashtable nonterminals_h
public GPNode[][] nonterminals
public Hashtable terminals_h
public GPNode[][] terminals
public Hashtable nodesByName
public GPNode[][][] nodesByArity
public GPNode[][][] nonterminalsUnderArity
public GPNode[][][] nonterminalsOverArity
public void postProcessFunctionSet()
public void setup(EvolutionState state, Parameter base)
public static GPFunctionSet functionSetFor(String functionSetName, EvolutionState state)
private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright © 2019. All rights reserved.