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