org.jgap.gp.function
Class Mean
- java.lang.Object
-
- org.jgap.gp.CommandGene
-
- org.jgap.gp.CommandDynamicArity
-
- org.jgap.gp.function.Mean
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, ICloneable
public class Mean extends CommandDynamicArity implements ICloneable
This class calculates the Mean of N numbers.- Since:
- 3.5
- 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
-
Fields inherited from interface org.jgap.util.ICloneable
CVS_REVISION
-
-
Constructor Summary
Constructors Constructor and Description Mean(GPConfiguration a_conf, java.lang.Class a_returnType, int a_arityInitial, int a_arityMin, int a_arityMax)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()doubleexecute_double(ProgramChromosome c, int n, java.lang.Object[] args)Executes this node as a double.java.lang.StringtoString()-
Methods inherited from class org.jgap.gp.CommandDynamicArity
dynamizeArity
-
Methods inherited from class org.jgap.gp.CommandGene
cleanup, compareTo, ensureUniqueness, ensureUniqueness, ensureUniqueness2, equals, execute_boolean, 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
-
-
-
-
Constructor Detail
-
Mean
public Mean(GPConfiguration a_conf, java.lang.Class a_returnType, int a_arityInitial, int a_arityMin, int a_arityMax) throws InvalidConfigurationException
- Throws:
InvalidConfigurationException
-
-
Method Detail
-
execute_double
public double execute_double(ProgramChromosome c, int n, java.lang.Object[] args)
Description copied from class:CommandGeneExecutes this node as a double. Override to implement.- Overrides:
execute_doublein classCommandGene- Parameters:
c- ignored heren- ignored hereargs- ignored here- Returns:
- nothing but exception
-
toString
public java.lang.String toString()
- Specified by:
toStringin classCommandGene- Returns:
- the string representation of the command. Especially usefull to output a resulting formula in human-readable form.
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceICloneable- Overrides:
clonein classjava.lang.Object- Returns:
- clone of the current object instance
-
-
DMelt 3.0 © DataMelt by jWork.ORG