Documentation of 'org.jgap.gp.IGPProgram' Java class
IGPProgram
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 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 execute
        a_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 execute
        a_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 execute
        a_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 execute
        a_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 execute
        a_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 execute
        a_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 at
        a_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 with
        a_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)
      • 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()
      • 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

You see the box below because you did not login.