com.rubecula.darwin.core
Interface Genome

All Known Implementing Classes:
Genome_Abstract, Genome_Diploid, Genome_Haploid

public interface Genome

Defines the genetic information contained in a Darwinian system. A Genome may be either haploid (a single strand of genes) or diploid (a double strand), though, theoretically, a Genome could have any number of genes at a particular locus. This number is the "ode" or ("oidity") and can be accessed via getOde().
A genome is essentially a list of Locus instances.
Other properties of the genome include: an implementation of the Expression interface and an implementation of the Meiosis interface.
Note that there is currently no division of Loci into Chromosomes. TODO Is that reasonable?

Version:
$Revision: 1.1 $
Author:
Robin Hillyard

Field Summary
static int DIPLOID
          2 (two genes at a locus).
static int HAPLOID
          1 (one gene at a locus).
 
Method Summary
 void add(int index, Locus locus)
          Method to add a Locus at the specified index.
 boolean add(Locus locus)
          Method to add a Locus at the end of this Genome.
 Expression getExpresser()
          The implementer of Expression which an application has specified.
 Factory getFactory()
           
 Locus getLocus(int index)
           
 Meiosis getMeioter()
           
 Mutator getMutator()
           
 int getOde()
          Method to return the genetic form for this genome.
 int size()
           
 

Field Detail

DIPLOID

static final int DIPLOID
2 (two genes at a locus).

See Also:
Constant Field Values

HAPLOID

static final int HAPLOID
1 (one gene at a locus).

See Also:
Constant Field Values
Method Detail

add

void add(int index,
         Locus locus)
Method to add a Locus at the specified index.

Parameters:
index - the index at which the new object will appear.
locus - a locus to be inserted into this Genome.
See Also:
List.add(int, java.lang.Object)

add

boolean add(Locus locus)
Method to add a Locus at the end of this Genome.

Parameters:
locus - a locus to be inserted into this Genome.
See Also:
add(int, Locus)

getExpresser

Expression getExpresser()
The implementer of Expression which an application has specified.

Returns:
the implementer of Expression for this Genome.

getFactory

Factory getFactory()
Returns:
the implementer of Factory for this genome. TODO since there is only one Factory interface and it creates objects of various kinds, not just Genotypes, Genes, Alleles, etc. we should consider splitting it into Genome-related factory methods and non-genome-related factory methods.

getLocus

Locus getLocus(int index)
Parameters:
index -
Returns:
the locus defined by index (0..N)

getMeioter

Meiosis getMeioter()
Returns:
the application-specified implementer of Meiosis

getMutator

Mutator getMutator()
Returns:
the mutator

getOde

int getOde()
Method to return the genetic form for this genome.

Returns:
the "oidity" which will normally be either HAPLOID, i.e. simple or DIPLOID, i.e. double.

size

int size()
Returns:
the number of loci (implementations of Locus) defined for this Genome.