org.jgap.gp
Class CommandDynamicArity
- java.lang.Object
-
- org.jgap.gp.CommandGene
-
- org.jgap.gp.CommandDynamicArity
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable
public abstract class CommandDynamicArity extends CommandGene
Abstract base class for GP-commands with a dynamic number of children.- Since:
- 3.4
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgap.gp.CommandGene
CommandGene.COMMAND_TYPE
-
-
Field Summary
-
Fields inherited from class org.jgap.gp.CommandGene
BooleanClass, CharacterClass, DELTA, DoubleClass, FloatClass, IntegerClass, LongClass, nodeIndex, VoidClass
-
-
Constructor Summary
Constructors Constructor and Description CommandDynamicArity()Default constructor, only for dynamic instantiation.CommandDynamicArity(GPConfiguration a_conf, int a_arityInitial, int a_arityMin, int a_arityMax, java.lang.Class a_returnType)CommandDynamicArity(GPConfiguration a_conf, int a_arityInitial, int a_arityMin, int a_arityMax, java.lang.Class a_returnType, int a_subReturnType)CommandDynamicArity(GPConfiguration a_conf, int a_arityInitial, int a_arityMin, int a_arityMax, java.lang.Class a_returnType, int a_subReturnType, int[] a_subChildTypes)Allows specifying a sub return type and sub child types.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddynamizeArity()Adaptation of the arity so that it represents a value within the interval [m_arityMin, m_arityMax].-
Methods inherited from class org.jgap.gp.CommandGene
cleanup, compareTo, ensureUniqueness, ensureUniqueness, ensureUniqueness2, equals, execute_boolean, execute_double, execute_float, execute_int, execute_long, execute_object, execute_void, execute, getAllele, getApplicationData, getArity, getChildType, getEnergy, getGPConfiguration, getName, getPersistentRepresentation, getReturnType, getSubChildType, getSubChildTypes, getSubReturnType, hashCode, isAffectGlobalState, isCompareApplicationData, isFloatType, isIntegerType, isValid, isValid, setAllele, setApplicationData, setCompareApplicationData, setEnergy, setNoValidation, setReturnType, setToRandomValue, setValueFromPersistentRepresentation, size, toString
-
-
-
-
Constructor Detail
-
CommandDynamicArity
public CommandDynamicArity() throws java.lang.ExceptionDefault constructor, only for dynamic instantiation.- Throws:
java.lang.Exception- Since:
- 3.4
-
CommandDynamicArity
public CommandDynamicArity(GPConfiguration a_conf, int a_arityInitial, int a_arityMin, int a_arityMax, java.lang.Class a_returnType) throws InvalidConfigurationException
- Throws:
InvalidConfigurationException
-
CommandDynamicArity
public CommandDynamicArity(GPConfiguration a_conf, int a_arityInitial, int a_arityMin, int a_arityMax, java.lang.Class a_returnType, int a_subReturnType) throws InvalidConfigurationException
- Throws:
InvalidConfigurationException
-
CommandDynamicArity
public CommandDynamicArity(GPConfiguration a_conf, int a_arityInitial, int a_arityMin, int a_arityMax, java.lang.Class a_returnType, int a_subReturnType, int[] a_subChildTypes) throws InvalidConfigurationException
Allows specifying a sub return type and sub child types.- Parameters:
a_conf- the configuration to usea_arityInitial- the number of children of the nodea_arityMin- the minimum arity allowed/requireda_arityMax- the maximum arity allowed/requireda_returnType- type of the return value of the nodea_subReturnType- sub type of the return type, optional usagea_subChildTypes- sub type of a child, optional usage- Throws:
InvalidConfigurationException- Since:
- 3.4
-
-
Method Detail
-
dynamizeArity
public void dynamizeArity()
Adaptation of the arity so that it represents a value within the interval [m_arityMin, m_arityMax].- Overrides:
dynamizeArityin classCommandGene- Since:
- 3.4
-
-
DMelt 3.0 © DataMelt by jWork.ORG