org.jgap.gp
Class GPProgramBase
- java.lang.Object
-
- org.jgap.gp.GPProgramBase
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, IGPProgram, ICloneable
- Direct Known Subclasses:
- GPProgram
public abstract class GPProgramBase extends java.lang.Object implements IGPProgram
Base class for GPProgram's. See org.jgap.gp.impl.GPProgram for an implementation.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description GPProgramBase()Default constructor, only for dynamic instantiation.GPProgramBase(GPConfiguration a_conf)GPProgramBase(IGPProgram a_prog)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description doublecalcFitnessValue()abstract java.lang.Objectclone()booleanequals(java.lang.Object a_other)Compares this entity against the specified object.java.lang.ObjectgetApplicationData()java.lang.Class[]getArgType(int a_index)java.lang.Class[][]getArgTypes()doublegetFitnessValue()doublegetFitnessValueDirectly()GPConfigurationgetGPConfiguration()int[]getMaxDepths()intgetMaxNodes()int[]getMinDepths()CommandGene[]getNodeSet(int a_index)CommandGene[][]getNodeSets()java.lang.ClassgetType(int a_index)java.lang.Class[]getTypes()voidsetApplicationData(java.lang.Object a_data)Sets the application data object.voidsetArgTypes(java.lang.Class[][] a_argTypes)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)-
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgap.gp.IGPProgram
execute_boolean, execute_double, execute_float, execute_int, execute_object, execute_void, getChromosome, getCommandOfClass, getPersistentRepresentation, setChromosome, size, toStringNorm
-
-
-
-
Constructor Detail
-
GPProgramBase
public GPProgramBase() throws java.lang.ExceptionDefault constructor, only for dynamic instantiation.- Throws:
java.lang.Exception- Since:
- 3.3.4
-
GPProgramBase
public GPProgramBase(GPConfiguration a_conf) throws InvalidConfigurationException
- Throws:
InvalidConfigurationException
-
GPProgramBase
public GPProgramBase(IGPProgram a_prog) throws InvalidConfigurationException
- Throws:
InvalidConfigurationException
-
-
Method Detail
-
getGPConfiguration
public GPConfiguration getGPConfiguration()
- Specified by:
getGPConfigurationin interfaceIGPProgram
-
equals
public boolean equals(java.lang.Object a_other)
Compares this entity against the specified object.- Overrides:
equalsin classjava.lang.Object- Parameters:
a_other- the object to compare against- Returns:
- true: if the objects are the same, false otherwise
- Since:
- 3.0
-
calcFitnessValue
public double calcFitnessValue()
- Returns:
- fitness value of this program determined via the registered fitness function
- Since:
- 3.0
-
getFitnessValue
public double getFitnessValue()
- Specified by:
getFitnessValuein interfaceIGPProgram- Returns:
- fitness value of this program, cached access
- Since:
- 3.0
-
getFitnessValueDirectly
public double getFitnessValueDirectly()
- Returns:
- computed fitness value of this program, may be unitialized
- Since:
- 3.2
-
setFitnessValue
public void setFitnessValue(double a_fitness)
- Specified by:
setFitnessValuein interfaceIGPProgram
-
setTypes
public void setTypes(java.lang.Class[] a_types)
- Specified by:
setTypesin interfaceIGPProgram
-
getTypes
public java.lang.Class[] getTypes()
- Specified by:
getTypesin interfaceIGPProgram
-
getType
public java.lang.Class getType(int a_index)
-
setArgTypes
public void setArgTypes(java.lang.Class[][] a_argTypes)
- Specified by:
setArgTypesin interfaceIGPProgram
-
getArgTypes
public java.lang.Class[][] getArgTypes()
- Specified by:
getArgTypesin interfaceIGPProgram
-
getArgType
public java.lang.Class[] getArgType(int a_index)
-
setNodeSets
public void setNodeSets(CommandGene[][] a_nodeSets)
- Specified by:
setNodeSetsin interfaceIGPProgram
-
getNodeSets
public CommandGene[][] getNodeSets()
- Specified by:
getNodeSetsin interfaceIGPProgram
-
getNodeSet
public CommandGene[] getNodeSet(int a_index)
-
setMaxDepths
public void setMaxDepths(int[] a_maxDepths)
- Specified by:
setMaxDepthsin interfaceIGPProgram
-
getMaxDepths
public int[] getMaxDepths()
- Specified by:
getMaxDepthsin interfaceIGPProgram
-
setMinDepths
public void setMinDepths(int[] a_minDepths)
- Specified by:
setMinDepthsin interfaceIGPProgram
-
getMinDepths
public int[] getMinDepths()
- Specified by:
getMinDepthsin interfaceIGPProgram
-
setMaxNodes
public void setMaxNodes(int a_maxNodes)
- Specified by:
setMaxNodesin interfaceIGPProgram
-
getMaxNodes
public int getMaxNodes()
- Specified by:
getMaxNodesin interfaceIGPProgram
-
setApplicationData
public void setApplicationData(java.lang.Object a_data)
Sets the application data object.- Specified by:
setApplicationDatain interfaceIGPProgram- Parameters:
a_data- the object to set- Since:
- 3.01
-
getApplicationData
public java.lang.Object getApplicationData()
- Specified by:
getApplicationDatain interfaceIGPProgram- Returns:
- the application data object set
- Since:
- 3.01
-
clone
public abstract java.lang.Object clone()
- Specified by:
clonein interfaceICloneable- Overrides:
clonein classjava.lang.Object- Returns:
- deep clone of this instance
- Since:
- 3.2
-
-
DMelt 3.0 © DataMelt by jWork.ORG