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