com.rubecula.darwin.domain.genetics
Class Meiosis_Chromosome

java.lang.Object
  extended by net.sf.tostring0.AToString
      extended by com.rubecula.darwin.domain.genetics.Meiosis_
          extended by com.rubecula.darwin.domain.genetics.Meiosis_Chromosome
All Implemented Interfaces:
Meiosis, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString

public final class Meiosis_Chromosome
extends Meiosis_

Lifespan: permanent. Implementation for the Meiosis interface where genes on chromosomes tend to stick together (depending on the value of crossoverProbability).

Version:
$Revision: 1.20 $
Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.domain.genetics.Meiosis_
LOG
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Constructor Summary
Meiosis_Chromosome(org.apache.commons.math.random.RandomGenerator random)
          Public primary constructor for an implementer of Meiosis with given random number source and no crossover.
Meiosis_Chromosome(org.apache.commons.math.random.RandomGenerator random, double crossoverProbability)
          Public primary constructor for an implementer of Meiosis with given random number source.
 
Method Summary
 Genome doMeiosis(Genomic genomic, Genes genes, Chromosome chromosome)
          This method does meiosis for a set of genes.
protected  double getCrossoverProbability()
           
 
Methods inherited from class com.rubecula.darwin.domain.genetics.Meiosis_
doMeiosis, doMeiosisChromosome, getIdentifier, getRandom
 
Methods inherited from class net.sf.tostring0.AToString
toString, toString, toStringBrief, toStringId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Meiosis_Chromosome

public Meiosis_Chromosome(org.apache.commons.math.random.RandomGenerator random)
Public primary constructor for an implementer of Meiosis with given random number source and no crossover.

Parameters:
random - a source of random numbers.

Meiosis_Chromosome

public Meiosis_Chromosome(org.apache.commons.math.random.RandomGenerator random,
                          double crossoverProbability)
Public primary constructor for an implementer of Meiosis with given random number source.

Parameters:
random - a source of random numbers.
crossoverProbability - defaults to 0 (no crossover - whole chromosomes stay together). A value of 1 means that crossover will always occur (at a randomly chosen gene locus).
Method Detail

doMeiosis

public Genome doMeiosis(Genomic genomic,
                        Genes genes,
                        Chromosome chromosome)
This method does meiosis for a set of genes. Any genes not belonging to chromosome are ignored. Otherwise, each gene takes as its allele the allele determined by index, a randomly generated integer which is the same for all genes of the chromosome.

Parameters:
genomic -
genes - the genes to process
chromosome - the chromosome of interest.
Returns:
a genome which is the result of doing meiosis at the gene or chromosome level
See Also:
Meiosis.doMeiosis(com.rubecula.darwin.domain.helper.Genomic, com.rubecula.darwin.domain.helper.Genes, com.rubecula.darwin.domain.helper.Chromosome)

getCrossoverProbability

protected double getCrossoverProbability()
Returns:
the crossover probability which was set in the constructor (between 0 -- no crossover -- and 1 -- always crossover).


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.