org.jgap.gp
Interface ISingleNodeValidator
- All Known Implementing Classes:
- SingleNodeValidator
public interface ISingleNodeValidator
Checks whether a single node is valid during GP program creation.
This helps to avoid useless tries in program creation.
- Since:
- 3.6
Field Summary |
static java.lang.String |
CVS_REVISION
String containing the CVS revision. |
Method Summary |
boolean |
isAllowed(int a_chromIndex,
ProgramChromosome a_pc,
CommandGene[] a_functionSet,
CommandGene a_function,
java.lang.Class a_returnType,
int a_subReturnTyp,
int a_index)
Checks if the given a_function is allowed in the current context. |
CVS_REVISION
static final java.lang.String CVS_REVISION
- String containing the CVS revision. Read out via reflection!
- See Also:
- Constant Field Values
isAllowed
boolean isAllowed(int a_chromIndex,
ProgramChromosome a_pc,
CommandGene[] a_functionSet,
CommandGene a_function,
java.lang.Class a_returnType,
int a_subReturnTyp,
int a_index)
- Checks if the given a_function is allowed in the current context.
- Parameters:
a_chromIndex
- index of the chromosome within the GP programa_pc
- the instance of the ProgramChromosomea_functionSet
- the current function set within the program chromosome
(given as input parameter for convenience, could also be determined via
a_pc.m_genes)a_function
- the function that should be added, if alloweda_returnType
- the class the return type is required to havea_subReturnTyp
- the sub return type the return type is required to
havea_index
- the index of the up-to-date last command gene in the
program chromosome
- Returns:
- true if a_function's class exists within a_functionSet
- Since:
- 3.6