Documentation of 'org.jgap.gp.impl.BranchTypingCross' Java class
BranchTypingCross
org.jgap.gp.impl

Class BranchTypingCross

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable


    public class BranchTypingCross
    extends CrossMethod
    implements java.io.Serializable, java.lang.Comparable, java.lang.Cloneable
    Crossing over for GP ProgramChromosomes.
    Since:
    3.0
    See Also:
    Serialized Form
    • Constructor Detail

      • BranchTypingCross

        public BranchTypingCross(GPConfiguration a_config)
        Standard constructor.
        Parameters:
        a_config - the configuration to use
      • BranchTypingCross

        public BranchTypingCross(GPConfiguration a_config,
                                 boolean a_simpleChromosomeSelection)
        Parameters:
        a_config - the configuration to use
        a_simpleChromosomeSelection - true: plainly select chromosomes, false: select chromosomes proportionally to their size (=number of nodes within a chromosome)
        Since:
        3.4
    • Method Detail

      • operate

        public IGPProgram[] operate(IGPProgram a_i1,
                                    IGPProgram a_i2)
        Crosses two individuals. A random chromosome is chosen for crossing based on the proportion of nodes in each chromosome in the first individual.
        Specified by:
        operate in class CrossMethod
        Parameters:
        a_i1 - the first individual to cross
        a_i2 - the second individual to cross
        Returns:
        an array of the two resulting individuals
        Since:
        3.0
      • compareTo

        public int compareTo(java.lang.Object a_other)
        The compareTo-method.
        Specified by:
        compareTo in interface java.lang.Comparable
        Parameters:
        a_other - the other object to compare
        Returns:
        0 or 1 in this case, as BranchTypingCross objects keep no state
        Since:
        3.0
      • equals

        public boolean equals(java.lang.Object a_other)
        The equals-method.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        a_other - the other object to compare
        Returns:
        always true for non-null BranchTypingCross objects because they keep no state
        Since:
        3.0
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
        Returns:
        deep clone of this instance
        Since:
        3.2

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.