|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.prg.opp.LevelHolder
public class LevelHolder
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 |
---|
public LevelHolder(int currentLevel)
currentLevel
- The level to construct the holder for.Method Detail |
---|
public static boolean compatibleTypes(List<ValueType> parentTypes, List<ValueType> childTypes)
parentTypes
- The parent types.childTypes
- The child types.
public void decreaseLevel()
public int getCurrentLevel()
public ProgramNode getNodeFound()
public List<ValueType> getTypes()
public void setCurrentLevel(int currentLevel)
currentLevel
- the currentLevel to setpublic void setNodeFound(ProgramNode nodeFound)
nodeFound
- the nodeFound to setpublic void setTypes(List<ValueType> types)
types
- the types to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |