]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.h
added sparseDistanceMatrix class. Modified cluster commands to use the new sparse...
[mothur.git] / mothur.h
index 2c143e8667786c5740f0aa6324ea4062eab66b76..25b803fa393e27d0c2811e62efdeb042ce390dec 100644 (file)
--- a/mothur.h
+++ b/mothur.h
@@ -88,6 +88,7 @@ using namespace std;
 
 
 typedef unsigned long ull;
+typedef unsigned short intDist;
 
 struct IntNode {
        int lvalue;
@@ -119,7 +120,13 @@ struct diffPair {
                reverseProb = rp;
        }
 };
-
+/***********************************************************************/
+struct PDistCell{
+       ull index;
+       float dist;
+       PDistCell() :  index(0), dist(0) {};
+       PDistCell(ull c, float d) :  index(c), dist(d) {}
+};
 /************************************************************/
 struct clusterNode {
        int numSeq;
@@ -158,10 +165,14 @@ struct spearmanRank {
        
        spearmanRank(string n, float s) : name(n), score(s) {}
 };
+//***********************************************************************
+inline bool compareIndexes(PDistCell left, PDistCell right){
+       return (left.index > right.index);      
+}
 //********************************************************************************************************************
 //sorts highest to lowest
 inline bool compareSpearman(spearmanRank left, spearmanRank right){
-       return (left.score > right.score);      
+       return (left.score < right.score);      
 } 
 //********************************************************************************************************************
 //sorts highest to lowest