|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rubecula.darwin.domain.genetics.GenomeFactory
public final class GenomeFactory
Factory Class to create Genome objects. Applications can't change this class (it is final) but they can override the methods which call these methods. XXX consider renaming this and refactoring some of the methods to return Genotype objects.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
LOG
|
Method Summary | |
---|---|
static Genome |
makeGamete(Genomic genomic)
Factory method to create a haploid genome which conforms to the given Genomic and with genes where the alleles have been picked for
each locus according to the Locus.pickAllele() method. |
static Genome |
makeGenome(java.lang.Class<? extends Genome> clazz,
Genomic genomic,
java.lang.Object... parameters)
TEST |
static Genome |
makeLinear(Genomic genomic,
int ploidy)
Factory method to create an empty genome which conforms to the given Genomic and is diploid or haploid according to the
ploidy parameter. |
static Genome |
makeZygote(Genome gameteX,
Genes gameteY)
|
static Genome |
makeZygote(Genomic genomic)
Method to create (from "whole cloth") a new diploid Genome, by creating two gametes (using makeGamete(com.rubecula.darwin.domain.helper.Genomic) and then fertilizing them. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log LOG
Method Detail |
---|
public static Genome makeGamete(Genomic genomic)
Genomic
and with genes where the alleles have been picked for
each locus according to the Locus.pickAllele()
method.
genomic
- the genomic which defines the possible gene alleles.
public static Genome makeGenome(java.lang.Class<? extends Genome> clazz, Genomic genomic, java.lang.Object... parameters)
clazz
- the class of Genome to instantiate, which must have a
constructor of form Genome(Genomic,Object[]).genomic
- the genomicparameters
- the parameters for the constructor
Genome
.public static Genome makeLinear(Genomic genomic, int ploidy)
Genomic
and is diploid or haploid according to the
ploidy
parameter. Note the will be no genes in the result.
TODO consider returning a Genotype_, for example a Genotype_Linear, which
currently does not exist.
genomic
- the genomic to which the resulting genome will conform.ploidy
-
public static Genome makeZygote(Genome gameteX, Genes gameteY)
gameteX
- gameteY
-
public static Genome makeZygote(Genomic genomic)
makeGamete(com.rubecula.darwin.domain.helper.Genomic)
and then fertilizing them.
XXX check that this name is reasonably appropriate.
genomic
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |