6 #include "sparsematrix.hpp"
11 typedef vector<MatData> MatVec;
16 Cluster(RAbundVector*, ListVector*, SparseMatrix*, float, string);
17 virtual void update(double&);
18 virtual string getTag() = 0;
19 virtual void setMapWanted(bool m);
20 virtual map<string, int> getSeqtoBin() { return seq2Bin; }
23 void getRowColCells();
24 void removeCell(const MatData& cell, int vrow, int vcol, bool rmMatrix=true);
26 virtual bool updateDistance(MatData& colCell, MatData& rowCell) = 0;
28 virtual void clusterBins();
29 virtual void clusterNames();
30 virtual void updateMap();
34 SparseMatrix* dMatrix;
41 map<string, int> seq2Bin;
44 vector<MatVec> seqVec; // contains vectors of cells related to a certain sequence
51 /***********************************************************************/
53 class CompleteLinkage : public Cluster {
55 CompleteLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
56 bool updateDistance(MatData& colCell, MatData& rowCell);
63 /***********************************************************************/
65 class SingleLinkage : public Cluster {
67 SingleLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
69 bool updateDistance(MatData& colCell, MatData& rowCell);
76 /***********************************************************************/
78 class AverageLinkage : public Cluster {
80 AverageLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
81 bool updateDistance(MatData& colCell, MatData& rowCell);
93 /***********************************************************************/