|
FORESTER 1.92 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--forester.tools.DistanceCalculator
Field Summary | |
static double |
DEFAULT
|
Constructor Summary | |
DistanceCalculator()
Default constructor. |
|
DistanceCalculator(Tree t)
Constructor. |
|
DistanceCalculator(Tree t,
java.util.Vector ext_nodes)
Constructor. |
Method Summary | |
double |
getDistanceToLCA(java.lang.String seq_name)
Calculates the distance of the Node with seq name seq_name to the LCA of ext_nodes, which has been set either with constructor DistanceCalculator(Tree,Vector) or method setTreeAndExtNodes(Tree,Vector). |
double |
getDistanceToNode(Node outer,
Node inner)
Calculates the distance of Node outer to Node inner. |
double |
getDistanceToNode(java.lang.String seq_name,
Node inner)
Calculates the distance of the Node with seq name seq_name to Node inner. |
double |
getDistanceToRoot(Node n)
Calculates the distance of Node n to the root of Tree t which has been set either with a constructor, setTree(Tree), or setTreeAndExtNodes(Tree,Vector). |
double |
getDistanceToRoot(java.lang.String seq_name)
Calculates the distance of the Node with seq name seq_name to the root of Tree t, which has been set either with a constructor, setTree(Tree), or setTreeAndExtNodes(Tree,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(java.lang.String[] args)
|
void |
setTree(Tree t)
Sets the rooted Tree t for which the mean distance to the root and its variance and standard deviation are calculated. |
void |
setTreeAndExtNodes(Tree t,
java.util.ArrayList ext_nodes)
Sets the rooted Tree 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(Tree t,
java.util.Vector ext_nodes)
Sets the rooted Tree 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 |
|
Field Detail |
public static final double DEFAULT
Constructor Detail |
public DistanceCalculator()
public DistanceCalculator(Tree t)
t
- the rooted Tree for which the mean distance
to the root and its variance and standard
deviation are calculatedpublic DistanceCalculator(Tree t, java.util.Vector ext_nodes)
t
- the rooted Tree 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 void setTree(Tree t)
t
- the rooted Tree for which the mean distance
to the root and its variance and standard
deviation are calculatedpublic void setTreeAndExtNodes(Tree t, java.util.Vector ext_nodes)
t
- the rooted Tree 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 void setTreeAndExtNodes(Tree t, java.util.ArrayList ext_nodes)
t
- the rooted Tree 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 double getDistanceToRoot(Node n)
n
- the Node for which the distance to the root is to be
calculatedDistanceCalculator(Tree)
,
DistanceCalculator(Tree,Vector)
,
setTree(Tree)
,
setTreeAndExtNodes(Tree,Vector)
public double getDistanceToNode(Node outer, Node inner) throws java.lang.Exception
outer
- a Nodeinner
- a Node closer to the root than outerpublic double getDistanceToRoot(java.lang.String seq_name) throws java.lang.Exception
seq_name
- the seq name for the Node for which the distance
to the root is to be calculatedDistanceCalculator(Tree)
,
DistanceCalculator(Tree,Vector)
,
setTree(Tree)
,
setTreeAndExtNodes(Tree,Vector)
,
setTreeAndExtNodes(Tree,ArrayList)
public double getDistanceToLCA(java.lang.String seq_name) throws java.lang.Exception
seq_name
- the seq name for the Node for which the distance
to the LCA is to be calculatedDistanceCalculator(Tree,Vector)
,
setTreeAndExtNodes(Tree,Vector)
,
setTreeAndExtNodes(Tree,ArrayList)
public double getDistanceToNode(java.lang.String seq_name, Node inner) throws java.lang.Exception
seq_name
- the seq name of a Node further from the root than
Node innerinner
- a Nodepublic double getMean()
DistanceCalculator(Tree)
,
DistanceCalculator(Tree,Vector)
,
setTree(Tree)
,
setTreeAndExtNodes(Tree,Vector)
,
setTreeAndExtNodes(Tree,ArrayList)
public double getVariance()
DistanceCalculator(Tree)
,
DistanceCalculator(Tree,Vector)
,
setTree(Tree)
,
setTreeAndExtNodes(Tree,Vector)
,
setTreeAndExtNodes(Tree,ArrayList)
public double getStandardDeviation()
DistanceCalculator(Tree)
,
DistanceCalculator(Tree,Vector)
,
setTree(Tree)
,
setTreeAndExtNodes(Tree,Vector)
,
setTreeAndExtNodes(Tree,ArrayList)
public int getN()
public static void main(java.lang.String[] args)
|
FORESTER 1.92 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |