public class GPInitializer extends SimpleInitializer
Note that the Cliques must be set up in a very particular order:
Parameter bases
gp.type | GPTypes |
gp.nc | GPNodeConstraints |
gp.tc | GPTreeConstraints |
gp.fs | GPFunctionSets |
Modifier and Type | Field and Description |
---|---|
java.util.Hashtable |
functionSetRepository |
java.util.Hashtable |
nodeConstraintRepository |
GPNodeConstraints[] |
nodeConstraints |
int |
numAtomicTypes |
byte |
numNodeConstraints |
int |
numSetTypes |
byte |
numTreeConstraints |
static java.lang.String |
P_ATOMIC |
static java.lang.String |
P_FUNCTIONSETS |
static java.lang.String |
P_NODECONSTRAINTS |
static java.lang.String |
P_SET |
static java.lang.String |
P_SIZE |
static java.lang.String |
P_TREECONSTRAINTS |
static java.lang.String |
P_TYPE |
static int |
SIZE_OF_BYTE |
java.util.Hashtable |
treeConstraintRepository |
GPTreeConstraints[] |
treeConstraints |
java.util.Hashtable |
typeRepository
TODO Comment these members.
|
GPType[] |
types |
P_POP
Constructor and Description |
---|
GPInitializer() |
Modifier and Type | Method and Description |
---|---|
void |
postProcessTypes()
Assigns unique integers to each atomic type, and sets up compatibility
arrays for set types.
|
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.
|
void |
setupFunctionSets(EvolutionState state,
Parameter base) |
void |
setupNodeConstraints(EvolutionState state,
Parameter base)
Sets up all the GPNodeConstraints, loading them from the parameter
file.
|
void |
setupTreeConstraints(EvolutionState state,
Parameter base)
Sets up all the GPTreeConstraints, loading them from the parameter
file.
|
void |
setupTypes(EvolutionState state,
Parameter base)
Sets up all the types, loading them from the parameter file.
|
initialPopulation, setupPopulation
public static final int SIZE_OF_BYTE
public static final java.lang.String P_TYPE
public static final java.lang.String P_NODECONSTRAINTS
public static final java.lang.String P_TREECONSTRAINTS
public static final java.lang.String P_FUNCTIONSETS
public static final java.lang.String P_SIZE
public static final java.lang.String P_ATOMIC
public static final java.lang.String P_SET
public java.util.Hashtable typeRepository
public GPType[] types
public int numAtomicTypes
public int numSetTypes
public java.util.Hashtable nodeConstraintRepository
public GPNodeConstraints[] nodeConstraints
public byte numNodeConstraints
public java.util.Hashtable functionSetRepository
public java.util.Hashtable treeConstraintRepository
public GPTreeConstraints[] treeConstraints
public byte numTreeConstraints
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class SimpleInitializer
public void setupTypes(EvolutionState state, Parameter base)
public void postProcessTypes()
public void setupNodeConstraints(EvolutionState state, Parameter base)
public void setupFunctionSets(EvolutionState state, Parameter base)
public void setupTreeConstraints(EvolutionState state, Parameter base)