Package ec.gp

# Class GPInitializer

java.lang.Object
ec.Initializer
ec.simple.SimpleInitializer
ec.gp.GPInitializer

All Implemented Interfaces:
  `Setup`, `Singleton`, `Serializable`

public class GPInitializer extends SimpleInitializer
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:

1. GPType
2. GPNodeConstraints
3. GPFunctionSets
4. GPTreeConstraints

Parameter bases

`gp.type` | GPTypes
`gp.nc` | GPNodeConstraints
`gp.tc` | GPTreeConstraints
`gp.fs` | GPFunctionSets

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `Hashtable`
  `functionSetRepository`
  `Hashtable`
  `nodeConstraintRepository`
  `GPNodeConstraints[]`
  `nodeConstraints`
  `int`
  `numAtomicTypes`
  `byte`
  `numNodeConstraints`
  `int`
  `numSetTypes`
  `byte`
  `numTreeConstraints`
  `static final String`
  `P_ATOMIC`
  `static final String`
  `P_FUNCTIONSETS`
  `static final String`
  `P_NODECONSTRAINTS`
  `static final String`
  `P_SET`
  `static final String`
  `P_SIZE`
  `static final String`
  `P_TREECONSTRAINTS`
  `static final String`
  `P_TYPE`
  `static final int`
  `SIZE_OF_BYTE`
  `Hashtable`
  `treeConstraintRepository`
  `GPTreeConstraints[]`
  `treeConstraints`
  `Hashtable`
  `typeRepository`
  TODO Comment these members.
  `GPType[]`
  `types`

  ### Fields inherited from class ec.Initializer

  `P_POP`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GPInitializer()`

- ## Method Summary

  Modifier and Type
  Method
  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.

  ### Methods inherited from class ec.simple.SimpleInitializer

  `initialPopulation, setupPopulation`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### SIZE_OF_BYTE

    public static final int SIZE_OF_BYTE
    See Also:
      - Constant Field Values

  - ### P_TYPE

    public static final String P_TYPE
    See Also:
      - Constant Field Values

  - ### P_NODECONSTRAINTS

    public static final String P_NODECONSTRAINTS
    See Also:
      - Constant Field Values

  - ### P_TREECONSTRAINTS

    public static final String P_TREECONSTRAINTS
    See Also:
      - Constant Field Values

  - ### P_FUNCTIONSETS

    public static final String P_FUNCTIONSETS
    See Also:
      - Constant Field Values

  - ### P_SIZE

    public static final String P_SIZE
    See Also:
      - Constant Field Values

  - ### P_ATOMIC

    public static final String P_ATOMIC
    See Also:
      - Constant Field Values

  - ### P_SET

    public static final String P_SET
    See Also:
      - Constant Field Values

  - ### typeRepository

    public Hashtable typeRepository
    TODO Comment these members. TODO Make clients of these members more efficient by reducing unnecessary casting.

  - ### types

    public GPType[] types

  - ### numAtomicTypes

    public int numAtomicTypes

  - ### numSetTypes

    public int numSetTypes

  - ### nodeConstraintRepository

    public Hashtable nodeConstraintRepository

  - ### nodeConstraints

    public GPNodeConstraints[] nodeConstraints

  - ### numNodeConstraints

    public byte numNodeConstraints

  - ### functionSetRepository

    public Hashtable functionSetRepository

  - ### treeConstraintRepository

    public Hashtable treeConstraintRepository

  - ### treeConstraints

    public GPTreeConstraints[] treeConstraints

  - ### numTreeConstraints

    public byte numTreeConstraints

- ## Constructor Details

  - ### GPInitializer

    public GPInitializer()

- ## Method Details

  - ### setup

    public void setup(EvolutionState state, Parameter base)
    Description copied from interface: `Setup`
    Sets 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:
      `setup` in interface `Setup`
    Overrides:
      `setup` in class `SimpleInitializer`

  - ### setupTypes

    public void setupTypes(EvolutionState state, Parameter base)
    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

    public void setupNodeConstraints(EvolutionState state, Parameter base)
    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

    public void setupFunctionSets(EvolutionState state, Parameter base)

  - ### setupTreeConstraints

    public void setupTreeConstraints(EvolutionState state, Parameter base)
    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.