org.jgap.gp
Interface IGPProgram
-
- All Superinterfaces:
- java.lang.Cloneable, java.lang.Comparable, ICloneable, java.io.Serializable
- All Known Implementing Classes:
- GPProgram, GPProgramBase
public interface IGPProgram extends java.io.Serializable, java.lang.Comparable, ICloneable
Interface for GP programs.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringCVS_REVISIONString containing the CVS revision.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanexecute_boolean(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as a boolean function.doubleexecute_double(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as a double function.floatexecute_float(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as a float function.intexecute_int(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as an integer function.java.lang.Objectexecute_object(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as an object function.voidexecute_void(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as an object function.java.lang.ObjectgetApplicationData()java.lang.Class[][]getArgTypes()ProgramChromosomegetChromosome(int a_index)intgetCommandOfClass(int a_chromosomeNum, java.lang.Class a_class)Searches for a chromosome that has the given class and returns its index.doublegetFitnessValue()GPConfigurationgetGPConfiguration()int[]getMaxDepths()intgetMaxNodes()int[]getMinDepths()CommandGene[][]getNodeSets()java.lang.StringgetPersistentRepresentation()java.lang.Class[]getTypes()voidsetApplicationData(java.lang.Object a_data)Sets the application data object.voidsetArgTypes(java.lang.Class[][] a_argTypes)voidsetChromosome(int a_index, ProgramChromosome a_chrom)Sets the given chromosome at the given index.voidsetFitnessValue(double a_fitness)voidsetMaxDepths(int[] a_maxDepths)voidsetMaxNodes(int a_maxNodes)voidsetMinDepths(int[] a_minDepths)voidsetNodeSets(CommandGene[][] a_nodeSets)voidsetTypes(java.lang.Class[] a_types)intsize()java.lang.StringtoStringNorm(int a_startNode)Builds a string that represents the normalized output of the GP program.-
Methods inherited from interface org.jgap.util.ICloneable
clone
-
-
-
-
Field Detail
-
CVS_REVISION
static final java.lang.String CVS_REVISION
String containing the CVS revision. Read out via reflection!- See Also:
- Constant Field Values
-
-
Method Detail
-
execute_int
int execute_int(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as an integer function.- Parameters:
a_chromosomeNum- the index of the chromosome to executea_args- the arguments to use- Returns:
- the integer return value
- Since:
- 3.0
-
execute_float
float execute_float(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as a float function.- Parameters:
a_chromosomeNum- the index of the chromosome to executea_args- the arguments to use- Returns:
- the floar return value
- Since:
- 3.0
-
execute_double
double execute_double(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as a double function.- Parameters:
a_chromosomeNum- the index of the chromosome to executea_args- the arguments to use- Returns:
- the double return value
- Since:
- 3.0
-
execute_boolean
boolean execute_boolean(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as a boolean function.- Parameters:
a_chromosomeNum- the index of the chromosome to executea_args- the arguments to use- Returns:
- the boolean return value
- Since:
- 3.2
-
execute_object
java.lang.Object execute_object(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as an object function.- Parameters:
a_chromosomeNum- the index of the chromosome to executea_args- the arguments to use- Returns:
- the object return value
- Since:
- 3.0
-
execute_void
void execute_void(int a_chromosomeNum, java.lang.Object[] a_args)Executes the given chromosome as an object function.- Parameters:
a_chromosomeNum- the index of the chromosome to executea_args- the arguments to use- Since:
- 3.0
-
size
int size()
- Returns:
- the number of chromosomes in the program
- Since:
- 3.0
-
getChromosome
ProgramChromosome getChromosome(int a_index)
- Parameters:
a_index- the chromosome to get- Returns:
- the ProgramChromosome with the given index
- Since:
- 3.0
-
getFitnessValue
double getFitnessValue()
- Returns:
- fitness value of this program
- Since:
- 3.0
-
toStringNorm
java.lang.String toStringNorm(int a_startNode)
Builds a string that represents the normalized output of the GP program.- Parameters:
a_startNode- the node to start with- Returns:
- textual output in normalized notion
- Since:
- 3.0
-
setChromosome
void setChromosome(int a_index, ProgramChromosome a_chrom)Sets the given chromosome at the given index.- Parameters:
a_index- the index to the the chromosome ata_chrom- the chromosome to set- Since:
- 3.0
-
getCommandOfClass
int getCommandOfClass(int a_chromosomeNum, java.lang.Class a_class)Searches for a chromosome that has the given class and returns its index.- Parameters:
a_chromosomeNum- the index of the chromosome to start the search witha_class- the class to find- Returns:
- the index of the first chromosome found that is of a_class, or -1
- Since:
- 3.0
-
setFitnessValue
void setFitnessValue(double a_fitness)
-
setTypes
void setTypes(java.lang.Class[] a_types)
-
getTypes
java.lang.Class[] getTypes()
-
setArgTypes
void setArgTypes(java.lang.Class[][] a_argTypes)
-
getArgTypes
java.lang.Class[][] getArgTypes()
-
setNodeSets
void setNodeSets(CommandGene[][] a_nodeSets)
-
getNodeSets
CommandGene[][] getNodeSets()
-
setMaxDepths
void setMaxDepths(int[] a_maxDepths)
-
getMaxDepths
int[] getMaxDepths()
-
setMinDepths
void setMinDepths(int[] a_minDepths)
-
getMinDepths
int[] getMinDepths()
-
setMaxNodes
void setMaxNodes(int a_maxNodes)
-
getMaxNodes
int getMaxNodes()
-
getGPConfiguration
GPConfiguration getGPConfiguration()
-
setApplicationData
void setApplicationData(java.lang.Object a_data)
Sets the application data object.- Parameters:
a_data- the object to set- Since:
- 3.01
-
getApplicationData
java.lang.Object getApplicationData()
- Returns:
- the application data object set
- Since:
- 3.01
-
getPersistentRepresentation
java.lang.String getPersistentRepresentation()
- Returns:
- the persistent representation of the population, including all GP programs
- Since:
- 3.3
-
-
DMelt 3.0 © DataMelt by jWork.ORG