Documentation of 'org.encog.ml.genetic.crossover.Splice' Java class
Splice
org.encog.ml.genetic.crossover

Class Splice

  • All Implemented Interfaces:
    EvolutionaryOperator


    public class Splice
    extends java.lang.Object
    implements EvolutionaryOperator
    A simple cross over where genes are simply "spliced". Genes are allowed to repeat.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Splice(int theCutLength)
      Create a slice crossover with the specified cut length.
    • Constructor Detail

      • Splice

        public Splice(int theCutLength)
        Create a slice crossover with the specified cut length.
        Parameters:
        theCutLength - The cut length.
    • Method Detail

      • performOperation

        public void performOperation(java.util.Random rnd,
                                     Genome[] parents,
                                     int parentIndex,
                                     Genome[] offspring,
                                     int offspringIndex)
        Perform the evolutionary operation.
        Specified by:
        performOperation in interface EvolutionaryOperator
        Parameters:
        rnd - A random number generator.
        parents - The parents.
        parentIndex - The index into the parents array.
        offspring - The offspring.
        offspringIndex - An index into the offspring array.
      • offspringProduced

        public int offspringProduced()
        Specified by:
        offspringProduced in interface EvolutionaryOperator
        Returns:
        The number of offspring produced, which is 2 for splice crossover.
      • init

        public void init(EvolutionaryAlgorithm theOwner)
        Called to setup the evolutionary operator.
        Specified by:
        init in interface EvolutionaryOperator
        Parameters:
        theOwner - The evolutionary algorithm used with this operator.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.