Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`LevelHolder(int currentLevel)` Construct the level holder.

Method Summary
`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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.