JGAP

org.jgap.gp
Class MathCommand

java.lang.Object
  extended by org.jgap.gp.CommandGene
      extended by org.jgap.gp.MathCommand
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
Abs, Add, Add3, Add4, AddAndStore, And, AndD, ArcCosine, ArcSine, ArcTangent, Ceil, Constant, Cosine, Divide, Equals, Exp, False, Floor, Gamma, Gaussian, GreaterThan, Hill, Increment, IncrementMemory, LesserThan, Log, Logistic, Max, Min, Modulo, ModuloD, Multiply, Multiply3, NOP, Not, NotD, Or, OrD, Pop, Pow, RandomGenerator, Round, Sigmoid, Sign, Sine, Sqrt, Step, Subtract, Switch, Tangent, True, Xor, XorD

public abstract class MathCommand
extends CommandGene

Abstract base class for GP-commands related to mathematical calculation.

Since:
3.0
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
MathCommand(GPConfiguration a_conf, int a_arity, java.lang.Class a_returnType)
           
MathCommand(GPConfiguration a_conf, int a_arity, java.lang.Class a_returnType, int a_subReturnType)
           
MathCommand(GPConfiguration a_conf, int a_arity, java.lang.Class a_returnType, int a_subReturnType, int a_subChildType)
          Allows specifying a sub return type and a single sub child type.
MathCommand(GPConfiguration a_conf, int a_arity, java.lang.Class a_returnType, int a_subReturnType, int[] a_subChildTypes)
          Allows specifying a sub return type and sub child types.
 
Method Summary
 
Methods inherited from class org.jgap.gp.CommandGene
check, check, cleanup, compareTo, dynamizeArity, ensureUniqueness, ensureUniqueness, ensureUniqueness2, equals, execute_boolean, execute_double, execute_float, execute_int, execute_long, execute_object, execute_void, execute, getAllele, getApplicationData, getArity, getArityMax, getArityMin, getChildType, getCommandType, getEnergy, getGPConfiguration, getInternalValue, getName, getPersistentRepresentation, getPersistentRepresentationExt, getReturnType, getSubChildType, getSubChildTypes, getSubReturnType, hashCode, init, isAffectGlobalState, isCompareApplicationData, isFloatType, isIntegerType, isValid, isValid, setAllele, setApplicationData, setArity, setArityMax, setArityMin, setCompareApplicationData, setEnergy, setNoValidation, setReturnType, setToRandomValue, setValueFromPersistentRepresentation, setValueFromString, size, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MathCommand

public MathCommand(GPConfiguration a_conf,
                   int a_arity,
                   java.lang.Class a_returnType)
            throws InvalidConfigurationException
Throws:
InvalidConfigurationException

MathCommand

public MathCommand(GPConfiguration a_conf,
                   int a_arity,
                   java.lang.Class a_returnType,
                   int a_subReturnType)
            throws InvalidConfigurationException
Throws:
InvalidConfigurationException

MathCommand

public MathCommand(GPConfiguration a_conf,
                   int a_arity,
                   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 use
a_arity - the number of children of the node
a_returnType - type of the return value of the node
a_subReturnType - sub type of the return type, optional usage
a_subChildTypes - sub type of a child, optional usage
Throws:
InvalidConfigurationException
Since:
3.2

MathCommand

public MathCommand(GPConfiguration a_conf,
                   int a_arity,
                   java.lang.Class a_returnType,
                   int a_subReturnType,
                   int a_subChildType)
            throws InvalidConfigurationException
Allows specifying a sub return type and a single sub child type.

Parameters:
a_conf - the configuration to use
a_arity - the number of children of the node
a_returnType - type of the return value of the node
a_subReturnType - sub type of the return type, optional usage
a_subChildType - sub type of a child, optional usage
Throws:
InvalidConfigurationException
Since:
3.2

JGAP