|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.forester.sdi.DistanceCalculator
public class DistanceCalculator
Field Summary | |
---|---|
static double |
DEFAULT
|
Constructor Summary | |
---|---|
DistanceCalculator()
Default constructor. |
|
DistanceCalculator(Phylogeny t)
Constructor. |
|
DistanceCalculator(Phylogeny t,
Vector<PhylogenyNode> ext_nodes)
Constructor. |
Method Summary | |
---|---|
double |
getDistanceToLCA(String seq_name)
Calculates the distance of the PhylogenyNode with seq name seq_name to the LCA of ext_nodes, which has been set either with constructor DistanceCalculator(Phylogeny,Vector) or method setTreeAndExtNodes(Phylogeny,Vector). |
double |
getDistanceToNode(PhylogenyNode outer,
PhylogenyNode inner)
Calculates the distance of PhylogenyNode outer to PhylogenyNode inner. |
double |
getDistanceToNode(String seq_name,
PhylogenyNode inner)
Calculates the distance of the PhylogenyNode with seq name seq_name to PhylogenyNode inner. |
double |
getDistanceToRoot(PhylogenyNode n)
Calculates the distance of PhylogenyNode n to the root of Phylogeny t which has been set either with a constructor, setTree(Phylogeny), or setTreeAndExtNodes(Phylogeny,Vector). |
double |
getDistanceToRoot(String seq_name)
Calculates the distance of the PhylogenyNode with seq name seq_name to the root of Phylogeny t, which has been set either with a constructor, setTree(Phylogeny), or setTreeAndExtNodes(Phylogeny,Vector). |
double |
getMean()
Returns the mean distance. |
int |
getN()
Returns the sum of all Nodes used to calculate the mean. |
double |
getStandardDeviation()
Returns the standard deviation. |
double |
getVariance()
Returns the variance. |
static void |
main(String[] args)
|
void |
setTree(Phylogeny t)
Sets the rooted Phylogeny t for which the mean distance to the root and its variance and standard deviation are calculated. |
void |
setTreeAndExtNodes(Phylogeny t,
ArrayList<PhylogenyNode> ext_nodes)
Sets the rooted Phylogeny t and the external Nodes ext_nodes for which the mean distance to their lowest common ancestor and its variance and standard deviation are calculated. |
void |
setTreeAndExtNodes(Phylogeny t,
Vector<PhylogenyNode> ext_nodes)
Sets the rooted Phylogeny t and the external Nodes ext_nodes for which the mean distance to their lowest common ancestor and its variance and standard deviation are calculated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT
Constructor Detail |
---|
public DistanceCalculator()
public DistanceCalculator(Phylogeny t)
t
- the rooted Phylogeny for which the mean distance to the root
and its variance and standard deviation are calculatedpublic DistanceCalculator(Phylogeny t, Vector<PhylogenyNode> ext_nodes)
t
- the rooted Phylogeny containing Nodes in Vector ext_nodesext_nodes
- a Vector of Nodes of t, the mean distance to their lowest
common ancestor and its variance and standard deviation are
calculatedMethod Detail |
---|
public double getDistanceToLCA(String seq_name)
seq_name
- the seq name for the PhylogenyNode for which the distance to
the LCA is to be calculated
DistanceCalculator(Phylogeny,Vector)
,
setTreeAndExtNodes(Phylogeny,Vector)
,
setTreeAndExtNodes(Phylogeny,ArrayList)
public double getDistanceToNode(PhylogenyNode outer, PhylogenyNode inner)
outer
- a PhylogenyNodeinner
- a PhylogenyNode closer to the root than outer
public double getDistanceToNode(String seq_name, PhylogenyNode inner)
seq_name
- the seq name of a PhylogenyNode further from the root than
PhylogenyNode innerinner
- a PhylogenyNode
public double getDistanceToRoot(PhylogenyNode n)
n
- the PhylogenyNode for which the distance to the root is to be
calculated
DistanceCalculator(Phylogeny)
,
DistanceCalculator(Phylogeny,Vector)
,
setTree(Phylogeny)
,
setTreeAndExtNodes(Phylogeny,Vector)
public double getDistanceToRoot(String seq_name)
seq_name
- the seq name for the PhylogenyNode for which the distance to
the root is to be calculated
DistanceCalculator(Phylogeny)
,
DistanceCalculator(Phylogeny,Vector)
,
setTree(Phylogeny)
,
setTreeAndExtNodes(Phylogeny,Vector)
,
setTreeAndExtNodes(Phylogeny,ArrayList)
public double getMean()
DistanceCalculator(Phylogeny)
,
DistanceCalculator(Phylogeny,Vector)
,
setTree(Phylogeny)
,
setTreeAndExtNodes(Phylogeny,Vector)
,
setTreeAndExtNodes(Phylogeny,ArrayList)
public int getN()
public double getStandardDeviation()
DistanceCalculator(Phylogeny)
,
DistanceCalculator(Phylogeny,Vector)
,
setTree(Phylogeny)
,
setTreeAndExtNodes(Phylogeny,Vector)
,
setTreeAndExtNodes(Phylogeny,ArrayList)
public double getVariance()
DistanceCalculator(Phylogeny)
,
DistanceCalculator(Phylogeny,Vector)
,
setTree(Phylogeny)
,
setTreeAndExtNodes(Phylogeny,Vector)
,
setTreeAndExtNodes(Phylogeny,ArrayList)
public void setTree(Phylogeny t)
t
- the rooted Phylogeny for which the mean distance to the root
and its variance and standard deviation are calculatedpublic void setTreeAndExtNodes(Phylogeny t, ArrayList<PhylogenyNode> ext_nodes)
t
- the rooted Phylogeny containing Nodes in Vector ext_nodesext_nodes
- a ArrayList of Nodes of t, the mean distance to their lowest
common ancestor and its variance and standard deviation are
calculatedpublic void setTreeAndExtNodes(Phylogeny t, Vector<PhylogenyNode> ext_nodes)
t
- the rooted Phylogeny containing Nodes in Vector ext_nodesext_nodes
- a Vector of Nodes of t, the mean distance to their lowest
common ancestor and its variance and standard deviation are
calculatedpublic static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |