VariableBitChromosome (JEvolution)
Date: 2013-03-21

evSOLve.JEvolution.chromosomes

## Class VariableBitChromosome

- java.lang.Object
- - evSOLve.JEvolution.chromosomes.Chromosome
  - - evSOLve.JEvolution.chromosomes.BitChromosome
    - - evSOLve.JEvolution.chromosomes.VariableBitChromosome

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

      public class VariableBitChromosome
      extends BitChromosome

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class evSOLve.JEvolution.chromosomes.BitChromosome

      `bases`

    - ### Fields inherited from class evSOLve.JEvolution.chromosomes.Chromosome

      `BIASED, crossoverPoints, crossoverRate, LAPLACE, length, mutationRate, soupType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VariableBitChromosome()` The standard constructor.
    `VariableBitChromosome(Element c)` Creates a VariableBitChromosome via XML.
    `VariableBitChromosome(int length)` Constructs a chromosome of given length.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `doCrossover(Chromosome father)` Non-homologous 1--point crossover.

    - ### Methods inherited from class evSOLve.JEvolution.chromosomes.BitChromosome

      `clone, doMutation, equals, fromString, getBases, hashCode, mixSoup, toString`

    - ### Methods inherited from class evSOLve.JEvolution.chromosomes.Chromosome

      `create, getCrossoverPoints, getCrossoverRate, getLength, getMutationRate, getSoupType, setCrossoverPoints, setCrossoverRate, setLength, setMutationRate, setSoupType, toXml`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### VariableBitChromosome

          public VariableBitChromosome()

      The standard constructor.

    - #### VariableBitChromosome

          public VariableBitChromosome(int length)

      Constructs a chromosome of given length.
      Parameters:
        `length` - the number of bases

    - #### VariableBitChromosome

          public VariableBitChromosome(Element c)

      Creates a VariableBitChromosome via XML.
      Parameters:
        `c` - an XML Chromosome element

  - ### Method Detail

    - #### doCrossover

          public void doCrossover(Chromosome father)

      Non-homologous 1--point crossover. For each parent a single (different) X-point is randomly chosen. The genetic code from these X-points is swapped, hereby changing the length of the Chromosome.
      Overrides:
        `doCrossover` in class `BitChromosome`
      Parameters:
        `father` - a parent Chromosome (technically already a child).