Class NumberMeasure
- java.lang.Object
-
- org.jgap.gp.CommandGene
-
- org.aksw.limes.core.ml.algorithm.eagle.genes.NumberMeasure
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable,org.jgap.gp.IMutateable,org.jgap.util.ICloneable
public class NumberMeasure extends org.jgap.gp.CommandGene implements org.jgap.gp.IMutateable, org.jgap.util.ICloneableClass implements a command to compare- Version:
- Jul 21, 2016
- Author:
- Lyko, Mohamed Sherif (sherif@informatik.uni-leipzig.de)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NumberMeasure(org.jgap.gp.impl.GPConfiguration a_conf)Default Constructor.NumberMeasure(org.jgap.gp.impl.GPConfiguration a_conf, Class<?> a_returnType, boolean a_mutateable)Constructor for atomic similarity measures for numeric properties.NumberMeasure(org.jgap.gp.impl.GPConfiguration a_conf, Class<?> a_returnType, int a_subReturnType, boolean a_mutateable)Constructor for similarity measures for numeric values bound by a threshold.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jgap.gp.CommandGeneapplyMutation(int a_index, double a_percentage)Objectclone()Objectexecute_object(org.jgap.gp.impl.ProgramChromosome a_chrom, int a_n, Object[] args)Executes this CommandGene as object.voidexecute_void(org.jgap.gp.impl.ProgramChromosome a_chrom, int a_n, Object[] args)Class<?>getChildType(org.jgap.gp.IGPProgram a_ind, int a_chromNum)booleanisValid(org.jgap.gp.impl.ProgramChromosome a_program)booleanisValid(org.jgap.gp.impl.ProgramChromosome a_program, int a_index)StringtoString()-
Methods inherited from class org.jgap.gp.CommandGene
check, check, cleanup, compareTo, dynamizeArity, ensureUniqueness, ensureUniqueness, ensureUniqueness2, equals, execute, execute_boolean, execute_double, execute_float, execute_int, execute_long, getAllele, getApplicationData, getArity, getArityMax, getArityMin, getCommandType, getEnergy, getGPConfiguration, getInternalValue, getName, getPersistentRepresentation, getPersistentRepresentationExt, getReturnType, getSubChildType, getSubChildTypes, getSubReturnType, hashCode, init, isAffectGlobalState, isCompareApplicationData, isFloatType, isIntegerType, setAllele, setApplicationData, setArity, setArityMax, setArityMin, setCompareApplicationData, setEnergy, setNoValidation, setReturnType, setToRandomValue, setValueFromPersistentRepresentation, setValueFromString, size
-
-
-
-
Constructor Detail
-
NumberMeasure
public NumberMeasure(org.jgap.gp.impl.GPConfiguration a_conf, Class<?> a_returnType, int a_subReturnType, boolean a_mutateable) throws org.jgap.InvalidConfigurationExceptionConstructor for similarity measures for numeric values bound by a threshold.- Parameters:
a_conf- JGAP GPConfiguration.a_returnType- The return type of this command.a_subReturnType- Specifies the SubReturnType.a_mutateable- true: enables mutation.- Throws:
org.jgap.InvalidConfigurationException- when an invalid value has been passed to a Configuration object
-
NumberMeasure
public NumberMeasure(org.jgap.gp.impl.GPConfiguration a_conf, Class<?> a_returnType, boolean a_mutateable) throws org.jgap.InvalidConfigurationExceptionConstructor for atomic similarity measures for numeric properties.- Parameters:
a_conf- JGAP GPConfiguration.a_returnType- The return type of this command.a_mutateable- true: enables mutation.- Throws:
org.jgap.InvalidConfigurationException- when an invalid value has been passed to a Configuration object
-
NumberMeasure
public NumberMeasure(org.jgap.gp.impl.GPConfiguration a_conf) throws org.jgap.InvalidConfigurationExceptionDefault Constructor. Sets return type to String.class, disables mutation.- Parameters:
a_conf- JGAP Configuration instance.- Throws:
org.jgap.InvalidConfigurationException- when an invalid value has been passed to a Configuration object
-
-
Method Detail
-
applyMutation
public org.jgap.gp.CommandGene applyMutation(int a_index, double a_percentage) throws org.jgap.InvalidConfigurationException- Specified by:
applyMutationin interfaceorg.jgap.gp.IMutateable- Throws:
org.jgap.InvalidConfigurationException
-
toString
public String toString()
- Specified by:
toStringin classorg.jgap.gp.CommandGene
-
getChildType
public Class<?> getChildType(org.jgap.gp.IGPProgram a_ind, int a_chromNum)
- Overrides:
getChildTypein classorg.jgap.gp.CommandGene
-
execute_object
public Object execute_object(org.jgap.gp.impl.ProgramChromosome a_chrom, int a_n, Object[] args)
Executes this CommandGene as object. Is called if the return type is set to String.class. Thereby returning the atomic LIMES expression"sim(a.resource, b.resource)|threshold".- Overrides:
execute_objectin classorg.jgap.gp.CommandGene
-
execute_void
public void execute_void(org.jgap.gp.impl.ProgramChromosome a_chrom, int a_n, Object[] args)- Overrides:
execute_voidin classorg.jgap.gp.CommandGene
-
isValid
public boolean isValid(org.jgap.gp.impl.ProgramChromosome a_program, int a_index)- Overrides:
isValidin classorg.jgap.gp.CommandGene
-
isValid
public boolean isValid(org.jgap.gp.impl.ProgramChromosome a_program)
- Overrides:
isValidin classorg.jgap.gp.CommandGene
-
-