pal.tree
Class TreeDistanceMatrix

java.lang.Object
  extended by pal.distance.DistanceMatrix
      extended by pal.tree.TreeDistanceMatrix
All Implemented Interfaces:
java.io.Serializable, IdGroup

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)

Version:
$Id: TreeDistanceMatrix.java,v 1.9 2002/12/05 04:27:28 matt Exp $
Author:
Korbinian Strimmer, Alexei Drummond
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface pal.misc.IdGroup
IdGroup.Utils
 
Constructor Summary
TreeDistanceMatrix(Tree t)
          compute induced distance matrix using actual branch lengths (using tree-induced order of sequences)
TreeDistanceMatrix(Tree t, boolean countEdges, double epsilon)
          compute induced distance matrix (using tree-induced order of sequences)
TreeDistanceMatrix(Tree t, IdGroup idGroup)
          compute induced distance matrix using actual branch lengths
TreeDistanceMatrix(Tree t, IdGroup idGroup, boolean countEdges, double epsilon)
          compute induced distance matrix
 
Method Summary
 void recompute(Tree t)
           
 
Methods inherited from class pal.distance.DistanceMatrix
absoluteDistance, addDistance, getClonedDistances, getClosestIndex, getClosestIndex, getDistance, getDistances, getIdCount, getIdentifier, getIdGroup, getSize, isSymmetric, meanDistance, printPHYLIP, setDistance, setDistances, setIdentifier, setIdGroup, squaredDistance, toString, whichIdNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeDistanceMatrix

public TreeDistanceMatrix(Tree t,
                          IdGroup idGroup,
                          boolean countEdges,
                          double epsilon)
compute induced distance matrix

Parameters:
idGroup - sequence order for the matrix
t - tree
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

TreeDistanceMatrix

public TreeDistanceMatrix(Tree t,
                          IdGroup idGroup)
compute induced distance matrix using actual branch lengths

Parameters:
idGroup - sequence order for the matrix
t - tree

TreeDistanceMatrix

public TreeDistanceMatrix(Tree t,
                          boolean countEdges,
                          double epsilon)
compute induced distance matrix (using tree-induced order of sequences)

Parameters:
t - tree
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

TreeDistanceMatrix

public TreeDistanceMatrix(Tree t)
compute induced distance matrix using actual branch lengths (using tree-induced order of sequences)

Parameters:
t - tree
Method Detail

recompute

public void recompute(Tree t)