com.rubecula.darwin.core
Interface Gene

All Known Implementing Classes:
Gene_Abstract, Gene_Diploid, Gene_Haploid, Gene_TS

public interface Gene

Defines the operations and properties of a Gene. A Gene is an object which is found at the locus of a genome. In a diploid system there will be two "genes" at any given locus. In most (haploid) systems there is one. A gene can take as its "value" an Allele which is valid at the given Locus.

Care must be taken to distinguish between a Gene and a Locus. In this framework, Gene is used to model the actual alleles that are present in the Genotype of a particular Organism. Locus, on the other hand, is used to model the set of possible alleles that can appear at a locus of a Genome.

Author:
Robin Hillyard

Method Summary
 Allele getAllele(int index)
          Accessor method to return the indexth allele for this gene.
 int getOde()
          Method to return the genetic form for this gene.
 void setAllele(int index, Allele allele)
          Mutator method to set the indexth allele for this gene.
 

Method Detail

getAllele

Allele getAllele(int index)
Accessor method to return the indexth allele for this gene.

Parameters:
index - which allele to get.
Returns:
the value of the allele at that index.

getOde

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

Returns:
the number of alleles for this gene (i.e. haploid or diploid).

setAllele

void setAllele(int index,
               Allele allele)
Mutator method to set the indexth allele for this gene.

Parameters:
index - which allele is to be set.
allele - the value of the allele to set.