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