pal.tree
Class TreeDistanceMatrix
java.lang.Object
|
+--pal.distance.DistanceMatrix
|
+--pal.tree.TreeDistanceMatrix
- All Implemented Interfaces:
- IdGroup, java.io.Serializable
- public class TreeDistanceMatrix
- extends DistanceMatrix
computes distance matrix induced by a tree
(needs only O(n^2) time, following algorithm DistanceInTree by
D.Bryant and P. Wadell. 1998. MBE 15:1346-1359)
- See Also:
- Serialized Form
Method Summary |
void |
computeDistances()
recompute distances (actual branch lengths) |
void |
computeDistances(boolean countEdges,
double epsilon)
recompute distances |
Methods inherited from class pal.distance.DistanceMatrix |
absoluteDistance, addDistance, getDistances, getIdCount, getIdentifier, getIdGroup, getSize, isSymmetric, meanDistance, printPHYLIP, setDistance, setIdentifier, squaredDistance, toString, whichIdNumber |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TreeDistanceMatrix
public TreeDistanceMatrix(IdGroup idGroup,
Tree t,
boolean countEdges,
double epsilon)
- compute induced distance matrix
- Parameters:
idGroup
- sequence order for the matrixt
- treecountEdges
- boolean variable deciding whether the actual
branch lengths are used in computing the distance
or whether simply all edges larger or equal a certain
threshold length are counted (each with weight 1.0)epsilon
- minimum branch length for a which an edge is counted
TreeDistanceMatrix
public TreeDistanceMatrix(IdGroup idGroup,
Tree t)
- compute induced distance matrix using actual branch lengths
- Parameters:
idGroup
- sequence order for the matrixt
- tree
TreeDistanceMatrix
public TreeDistanceMatrix(Tree t,
boolean countEdges,
double epsilon)
- compute induced distance matrix
(using tree-induced order of sequences)
- Parameters:
t
- treecountEdges
- boolean variable deciding whether the actual
branch lengths are used in computing the distance
or whether simply all edges larger or equal a certain
threshold length are counted (each with weight 1.0)epsilon
- minimum branch length for a which an edge is counted
TreeDistanceMatrix
public TreeDistanceMatrix(Tree t)
- compute induced distance matrix using actual branch lengths
(using tree-induced order of sequences)
- Parameters:
t
- tree
computeDistances
public void computeDistances()
- recompute distances (actual branch lengths)
computeDistances
public void computeDistances(boolean countEdges,
double epsilon)
- recompute distances
- Parameters:
countEdges
- boolean variable deciding whether the actual
branch lengths are used in computing the distance
or whether simply all edges larger or equal a certain
threshold length are counted (each with weight 1.0)epsilon
- minimum branch length for a which an edge is counted