public class AddMetric
extends org.jgap.gp.CommandGene
implements org.jgap.gp.IMutateable, org.jgap.util.ICloneable
| Constructor and Description |
|---|
AddMetric(org.jgap.gp.impl.GPConfiguration config)
Default Constructor.
|
AddMetric(org.jgap.gp.impl.GPConfiguration config,
Class<?> a_returnType,
boolean mutateable)
Constructor to manually set return type.
|
| Modifier and Type | Method and Description |
|---|---|
org.jgap.gp.CommandGene |
applyMutation() |
org.jgap.gp.CommandGene |
applyMutation(int a_index,
double a_percentage) |
Object |
clone() |
Object |
execute_object(org.jgap.gp.impl.ProgramChromosome a_chrom,
int a_n,
Object[] args) |
void |
execute_void(org.jgap.gp.impl.ProgramChromosome a_chrom,
int a_n,
Object[] args) |
Class<?> |
getChildType(org.jgap.gp.IGPProgram a_ind,
int a_chromNum)
We're expecting 2 pairs of aSimilarityCommand and a coefficient.
|
static String |
removeThresholdFromMeasure(String measure)
ADD metrics only have coefficients no local thresholds.
|
String |
toString() |
check, check, cleanup, compareTo, dynamizeArity, ensureUniqueness, ensureUniqueness, ensureUniqueness2, equals, execute_boolean, execute_double, execute_float, execute_int, execute_long, execute, getAllele, getApplicationData, getArity, getArityMax, getArityMin, 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, sizepublic AddMetric(org.jgap.gp.impl.GPConfiguration config)
throws org.jgap.InvalidConfigurationException
config - A GPConfigurationorg.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration objectpublic AddMetric(org.jgap.gp.impl.GPConfiguration config,
Class<?> a_returnType,
boolean mutateable)
throws org.jgap.InvalidConfigurationException
config - A GPConfigurationa_returnType - Class this CommandGene returns on executing.org.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration objectpublic static String removeThresholdFromMeasure(String measure)
measure, - e.g. trigrams(s.x,t.y)|0.8public String toString()
toString in class org.jgap.gp.CommandGenepublic Class<?> getChildType(org.jgap.gp.IGPProgram a_ind, int a_chromNum)
getChildType in class org.jgap.gp.CommandGenea_ind - A GPPrograma_chromNum - The number of the chromosome.public Object execute_object(org.jgap.gp.impl.ProgramChromosome a_chrom, int a_n, Object[] args)
execute_object in class org.jgap.gp.CommandGenepublic void execute_void(org.jgap.gp.impl.ProgramChromosome a_chrom,
int a_n,
Object[] args)
execute_void in class org.jgap.gp.CommandGenepublic org.jgap.gp.CommandGene applyMutation(int a_index,
double a_percentage)
throws org.jgap.InvalidConfigurationException
applyMutation in interface org.jgap.gp.IMutateableorg.jgap.InvalidConfigurationExceptionpublic org.jgap.gp.CommandGene applyMutation()
throws org.jgap.InvalidConfigurationException
org.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration objectCopyright © 2018. All rights reserved.