public class StringPreprocessingMeasure
extends org.jgap.gp.CommandGene
implements org.jgap.gp.IMutateable, org.jgap.util.ICloneable
StringMeasure to support evolution of preprocessing functions.
The basic structure is that it has now two children of the return type of both PreprocessingChain
and PreprocessingCommand| Constructor and Description |
|---|
StringPreprocessingMeasure(String opName,
org.jgap.gp.impl.GPConfiguration a_conf)
Basic constructor for an atomic similarity measure.
|
StringPreprocessingMeasure(String opName,
org.jgap.gp.impl.GPConfiguration a_conf,
Class<?> a_returnType,
boolean a_mutateable)
Constructor for atomic similarity measures.
|
StringPreprocessingMeasure(String opName,
org.jgap.gp.impl.GPConfiguration a_conf,
Class<?> a_returnType,
int a_subReturnType,
boolean a_mutateable)
Constructor for similarity measures bound by a threshold.
|
| Modifier and Type | Method and Description |
|---|---|
org.jgap.gp.CommandGene |
applyMutation()
Mutates this CommandGene.
|
org.jgap.gp.CommandGene |
applyMutation(int a_index,
double a_percentage) |
Object |
clone()
Clones the object.
|
Object |
execute_object(org.jgap.gp.impl.ProgramChromosome a_chrom,
int a_n,
Object[] args)
Executes this CommandGene as object.
|
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 expect the first 2 parameters to be resource identifier, the third to be an
(optional) double value as the threshold for this Similarity command.
|
String |
getName() |
String |
getOperationName() |
boolean |
isValid(org.jgap.gp.impl.ProgramChromosome a_program) |
boolean |
isValid(org.jgap.gp.impl.ProgramChromosome a_program,
int a_index) |
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, getPersistentRepresentation, getPersistentRepresentationExt, getReturnType, getSubChildType, getSubChildTypes, getSubReturnType, hashCode, init, isAffectGlobalState, isCompareApplicationData, isFloatType, isIntegerType, setAllele, setApplicationData, setArity, setArityMax, setArityMin, setCompareApplicationData, setEnergy, setNoValidation, setReturnType, setToRandomValue, setValueFromPersistentRepresentation, setValueFromString, sizepublic StringPreprocessingMeasure(String opName, org.jgap.gp.impl.GPConfiguration a_conf, Class<?> a_returnType, int a_subReturnType, boolean a_mutateable) throws org.jgap.InvalidConfigurationException
opName - Name of the LIMES similarity measure operation (e.g. "trigram").a_conf - JGAP GPConfiguration.a_returnType - The return type of this command.a_subReturnType - Specifies the SubReturnType.a_mutateable - true: this Commandgene is mutateable, viz. the LIMES similarity measure might be changed to another one out of the allowed operations.org.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration objectpublic StringPreprocessingMeasure(String opName, org.jgap.gp.impl.GPConfiguration a_conf, Class<?> a_returnType, boolean a_mutateable) throws org.jgap.InvalidConfigurationException
opName - Name of the LIMES similarity measure operation (e.g. "trigram").a_conf - JGAP GPConfiguration.a_returnType - The return type of this command.a_mutateable - true: this Commandgene is mutateable, viz. the LIMES similarity measure might be changed
to another one out of the allowed operations.org.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration objectpublic StringPreprocessingMeasure(String opName, org.jgap.gp.impl.GPConfiguration a_conf) throws org.jgap.InvalidConfigurationException
opName - name of the LIMES similarity measure operation (e.g. "trigram").a_conf - JGAP GPConfiguration.org.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration objectpublic 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 String getName()
getName in class org.jgap.gp.CommandGenepublic String getOperationName()
public Object execute_object(org.jgap.gp.impl.ProgramChromosome a_chrom, int a_n, Object[] args)
"sim(a.resource, b.resource)|threshold".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 objectpublic Object clone()
public boolean isValid(org.jgap.gp.impl.ProgramChromosome a_program,
int a_index)
isValid in class org.jgap.gp.CommandGenepublic boolean isValid(org.jgap.gp.impl.ProgramChromosome a_program)
isValid in class org.jgap.gp.CommandGeneCopyright © 2018. All rights reserved.