org.encog.ml.prg.opp

## Class LevelHolder

- java.lang.Object
- - org.encog.ml.prg.opp.LevelHolder

-     public class LevelHolder
      extends Object

  The level holder class is passed down as a tree is mutated. The level holder class is initially given the desired output of the program and tracks the desired output for each of the nodes. This allows for type-safe crossovers and mutations.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LevelHolder(int currentLevel)` Construct the level holder.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `compatibleTypes(List<ValueType> parentTypes, List<ValueType> childTypes)` Determine if the specified child types are compatible with the parent types.
    `void` | `decreaseLevel()` Decrease the level.
    `int` | `getCurrentLevel()`
    `ProgramNode` | `getNodeFound()`
    `List<ValueType>` | `getTypes()`
    `void` | `setCurrentLevel(int currentLevel)`
    `void` | `setNodeFound(ProgramNode nodeFound)`
    `void` | `setTypes(List<ValueType> types)`

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

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

- - ### Constructor Detail

    - #### LevelHolder

          public LevelHolder(int currentLevel)

      Construct the level holder.
      Parameters:
        `currentLevel` - The level to construct the holder for.

  - ### Method Detail

    - #### compatibleTypes

          public static boolean compatibleTypes(List<ValueType> parentTypes,
                                List<ValueType> childTypes)

      Determine if the specified child types are compatible with the parent types.
      Parameters:
        `parentTypes` - The parent types.
        `childTypes` - The child types.
      Returns:
        True, if compatible.

    - #### decreaseLevel

          public void decreaseLevel()

      Decrease the level.

    - #### getCurrentLevel

          public int getCurrentLevel()

      Returns:
        the currentLevel

    - #### getNodeFound

          public ProgramNode getNodeFound()

      Returns:
        the nodeFound

    - #### getTypes

          public List<ValueType> getTypes()

      Returns:
        the types

    - #### setCurrentLevel

          public void setCurrentLevel(int currentLevel)

      Parameters:
        `currentLevel` - the currentLevel to set

    - #### setNodeFound

          public void setNodeFound(ProgramNode nodeFound)

      Parameters:
        `nodeFound` - the nodeFound to set

    - #### setTypes

          public void setTypes(List<ValueType> types)

      Parameters:
        `types` - the types to set

Copyright © 2014. All Rights Reserved.