]> git.donarmstrong.com Git - mothur.git/blob - cluster.hpp
fixed some bugs
[mothur.git] / cluster.hpp
1 #ifndef CLUSTER_H
2 #define CLUSTER_H
3
4
5 #include "mothur.h"
6 #include "sparsematrix.hpp"
7
8 class RAbundVector;
9 class ListVector;
10 class SparseMatrix;
11
12 typedef list<PCell>::iterator MatData;
13
14 class Cluster {
15         
16 public:
17         Cluster(RAbundVector*, ListVector*, SparseMatrix*);
18         virtual void update() = 0;
19         
20 protected:      
21         void getRowColCells();
22         virtual void clusterBins();
23         virtual void clusterNames();
24         
25         RAbundVector* rabund;
26         ListVector* list;
27         SparseMatrix* dMatrix;  
28         
29         int smallRow;
30         int smallCol;
31         float smallDist;
32         vector<MatData> rowCells;
33         vector<MatData> colCells;
34         ull nRowCells;
35         ull nColCells;
36 };
37
38 /***********************************************************************/
39
40 class CompleteLinkage : public Cluster {
41 public:
42         CompleteLinkage(RAbundVector*, ListVector*, SparseMatrix*);
43         void update();
44         
45 private:
46                 
47 };
48
49 /***********************************************************************/
50
51 class SingleLinkage : public Cluster {
52 public:
53         SingleLinkage(RAbundVector*, ListVector*, SparseMatrix*);
54         void update();
55         
56 private:
57                 
58 };
59
60 /***********************************************************************/
61
62 class AverageLinkage : public Cluster {
63 public:
64         AverageLinkage(RAbundVector*, ListVector*, SparseMatrix*);
65         void update();
66         
67 private:
68                 
69 };
70
71 /***********************************************************************/
72
73 #endif