]> git.donarmstrong.com Git - mothur.git/blobdiff - cluster.hpp
added warning about merging with something above cutoff to cluster. working on chimeras
[mothur.git] / cluster.hpp
index 99d8b7d557a41cef684ad2f9aae7d636d621bbc7..6d7fc470e91eca8dae548ffb5594a4099a203f35 100644 (file)
@@ -13,9 +13,11 @@ typedef vector<MatData> MatVec;
 class Cluster {
        
 public:
-       Cluster(RAbundVector*, ListVector*, SparseMatrix*);
-    virtual void update();
+       Cluster(RAbundVector*, ListVector*, SparseMatrix*, float, string);
+    virtual void update(double&);                              
        virtual string getTag() = 0;
+       virtual void setMapWanted(bool m);  
+       virtual map<string, int> getSeqtoBin()  {  return seq2Bin;      }
 
 protected:     
        void getRowColCells();
@@ -25,6 +27,7 @@ protected:
 
        virtual void clusterBins();
        virtual void clusterNames();
+       virtual void updateMap();
        
        RAbundVector* rabund;
        ListVector* list;
@@ -33,8 +36,12 @@ protected:
        int smallRow;
        int smallCol;
        float smallDist;
+       bool mapWanted;
+       float cutoff;
+       map<string, int> seq2Bin;
+       string method;
        
-       vector<MatVec> seqVec;          // contains vectors of cells related to a certain sequence\r
+       vector<MatVec> seqVec;          // contains vectors of cells related to a certain sequence
        MatVec rowCells;
        MatVec colCells;
        ull nRowCells;
@@ -45,7 +52,7 @@ protected:
 
 class CompleteLinkage : public Cluster {
 public:
-       CompleteLinkage(RAbundVector*, ListVector*, SparseMatrix*);
+       CompleteLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
        bool updateDistance(MatData& colCell, MatData& rowCell);
        string getTag();
        
@@ -57,7 +64,7 @@ private:
 
 class SingleLinkage : public Cluster {
 public:
-       SingleLinkage(RAbundVector*, ListVector*, SparseMatrix*);
+       SingleLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
     void update();
        bool updateDistance(MatData& colCell, MatData& rowCell);
        string getTag();
@@ -70,7 +77,7 @@ private:
 
 class AverageLinkage : public Cluster {
 public:
-       AverageLinkage(RAbundVector*, ListVector*, SparseMatrix*);
+       AverageLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
        bool updateDistance(MatData& colCell, MatData& rowCell);
        string getTag();