PhyloSort

phylosort
Class TreeNodeComparator

java.lang.Object
  extended by phylosort.TreeNodeComparator
All Implemented Interfaces:
java.util.Comparator<TreeNode>

public class TreeNodeComparator
extends java.lang.Object
implements java.util.Comparator<TreeNode>

A comparator between between two nodes in a tree.

Version:
$Revision: 1.1.1.1 $
Author:
Ahmed Moustafa

Constructor Summary
TreeNodeComparator()
           
 
Method Summary
 int compare(TreeNode t1, TreeNode t2)
          Compares between two subtrees based on their branch lengths.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

TreeNodeComparator

public TreeNodeComparator()
Method Detail

compare

public int compare(TreeNode t1,
                   TreeNode t2)
Compares between two subtrees based on their branch lengths.

Specified by:
compare in interface java.util.Comparator<TreeNode>
Parameters:
t1 - The first node
t2 - The second node
Returns:
0 if t1 = t2, 1 if t1 > t2, or -1 if t1 < t2

PhyloSort

SourceForge.Net