jaga.evolve
Class Chopper

java.lang.Object
  |
  +--jaga.evolve.Chopper
All Implemented Interfaces:
GeneticOperator, java.io.Serializable

public class Chopper
extends java.lang.Object
implements GeneticOperator

Chopper is a Genetic Operator that will cut out a part of a genotype.

The size of the piece cut out is configurable and even randomized between limits.

The position where this piece will come from is also configurable.

NOTE: ONLY (FIXED) LENGTH OF INCISION CONFIGURABLE

See Also:
Serialized Form

Constructor Summary
Chopper()
          Creates new Chopper.
Chopper(int chopAmountP)
          Creates new Chopper.
 
Method Summary
 void operate(Selector selector, Population oldPopulation, Population newPopulation, int howMany)
          method that adds genotypes to the new population by extracting some from the old one and manipulating them in some way.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Chopper

public Chopper()
Creates new Chopper. Default values are used for chopAmount = 1.

Chopper

public Chopper(int chopAmountP)
Creates new Chopper.
Parameters:
chopAmountP - Fixed amount to chop from end of genotype.
Method Detail

operate

public void operate(Selector selector,
                    Population oldPopulation,
                    Population newPopulation,
                    int howMany)
method that adds genotypes to the new population by extracting some from the old one and manipulating them in some way.
Specified by:
operate in interface GeneticOperator
Parameters:
oldPopulation - in parameter having all the original genotypes
newPopulation - in/out parameter where the next generation of genotypes is being built
howMany - how many new genotypes to add to the new population

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object