|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.cas.montecarlo.Geometry
public abstract class Geometry
A class that extends Geometry represents the spatial relationship of the Chromosomes in a Genome. The Geometry abstract class establishes a standard for how extending geometry subclasses are to be written. The constructor for a subclass may take any number of parameters. Additional methods may be added in order to modify these parameters after an instance of a subclass has been created. The Genome object that is to be used as a basis for this subclass should be set by the driver using the setGenome method. Once a Genome object has been set, the arrange method must be called before any information may be obtained from this subclass.
Field Summary | |
---|---|
protected boolean |
arranged
|
protected Genome<Chromosome> |
gen
|
Constructor Summary | |
---|---|
Geometry()
The constructor for the Geometry abstract class. |
Method Summary | |
---|---|
abstract void |
arrange(java.util.Random rGen)
Calling this method causes this Geometry to arrange the Chromosomes from the Genome set by setGenome(). |
protected void |
checkArranged()
|
abstract double |
distance(Chromosome chrom1,
long location1,
Chromosome chrom2,
long location2)
Returns the distance between locations in the Genome. |
void |
setGenome(Genome<Chromosome> gen)
This method is intended to be used by the driver to specify the Genome object which this Geometry is to represent an arrangement of. |
long |
totalBP()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Genome<Chromosome> gen
protected boolean arranged
Constructor Detail |
---|
public Geometry()
Method Detail |
---|
public abstract double distance(Chromosome chrom1, long location1, Chromosome chrom2, long location2) throws java.lang.Exception
chrom1
- the Chromosome of the first locationlocation1
- the index of the first locationchrom2
- The Chromosome of the second locationlocation2
- the index of the second location
java.lang.Exception
- if arrange has not been called since the last time
a new Genome was setpublic abstract void arrange(java.util.Random rGen) throws java.lang.Exception
rGen
- a Random object to use in creating the arrangement
java.lang.Exception
- if no valid Genome has been setpublic void setGenome(Genome<Chromosome> gen)
gen
- a Genome objectpublic long totalBP() throws java.lang.Exception
java.lang.Exception
protected void checkArranged() throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |