Package ec.gp
Class GPInitializer
java.lang.Object
ec.Initializer
ec.simple.SimpleInitializer
ec.gp.GPInitializer
- All Implemented Interfaces:
Setup,Singleton,Serializable
GPInitializer is a SimpleInitializer which sets up all the Cliques,
( the initial
[tree/node]constraints, types, and function sets) for the GP system.
Note that the Cliques must be set up in a very particular order:
- GPType
- GPNodeConstraints
- GPFunctionSets
- GPTreeConstraints
Parameter bases
| gp.type | GPTypes |
| gp.nc | GPNodeConstraints |
| gp.tc | GPTreeConstraints |
| gp.fs | GPFunctionSets |
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintbyteintbytestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intTODO Comment these members.GPType[]Fields inherited from class ec.Initializer
P_POP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAssigns unique integers to each atomic type, and sets up compatibility arrays for set types.voidsetup(EvolutionState state, Parameter base) Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.voidsetupFunctionSets(EvolutionState state, Parameter base) voidsetupNodeConstraints(EvolutionState state, Parameter base) Sets up all the GPNodeConstraints, loading them from the parameter file.voidsetupTreeConstraints(EvolutionState state, Parameter base) Sets up all the GPTreeConstraints, loading them from the parameter file.voidsetupTypes(EvolutionState state, Parameter base) Sets up all the types, loading them from the parameter file.Methods inherited from class ec.simple.SimpleInitializer
initialPopulation, setupPopulation
-
Field Details
-
SIZE_OF_BYTE
public static final int SIZE_OF_BYTE- See Also:
-
P_TYPE
- See Also:
-
P_NODECONSTRAINTS
- See Also:
-
P_TREECONSTRAINTS
- See Also:
-
P_FUNCTIONSETS
- See Also:
-
P_SIZE
- See Also:
-
P_ATOMIC
- See Also:
-
P_SET
- See Also:
-
typeRepository
TODO Comment these members. TODO Make clients of these members more efficient by reducing unnecessary casting. -
types
-
numAtomicTypes
public int numAtomicTypes -
numSetTypes
public int numSetTypes -
nodeConstraintRepository
-
nodeConstraints
-
numNodeConstraints
public byte numNodeConstraints -
functionSetRepository
-
treeConstraintRepository
-
treeConstraints
-
numTreeConstraints
public byte numTreeConstraints
-
-
Constructor Details
-
GPInitializer
public GPInitializer()
-
-
Method Details
-
setup
Description copied from interface:SetupSets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.- Specified by:
setupin interfaceSetup- Overrides:
setupin classSimpleInitializer
-
setupTypes
Sets up all the types, loading them from the parameter file. This must be called before anything is called which refers to a type by name. -
postProcessTypes
public void postProcessTypes()Assigns unique integers to each atomic type, and sets up compatibility arrays for set types. If you add new types (heaven forbid), you should call this method again to get all the types set up properly. However, you will have to set up the function sets again as well, as their arrays are based on these type numbers. -
setupNodeConstraints
Sets up all the GPNodeConstraints, loading them from the parameter file. This must be called before anything is called which refers to a type by name. -
setupFunctionSets
-
setupTreeConstraints
Sets up all the GPTreeConstraints, loading them from the parameter file. This must be called before anything is called which refers to a type by name.
-