6 #include "sparsematrix.hpp"
12 typedef vector<MatData> MatVec;
17 Cluster(RAbundVector*, ListVector*, SparseMatrix*, float, string);
18 virtual void update(double&);
19 virtual string getTag() = 0;
20 virtual void setMapWanted(bool m);
21 virtual map<string, int> getSeqtoBin() { return seq2Bin; }
24 void getRowColCells();
25 void removeCell(const MatData& cell, int vrow, int vcol, bool rmMatrix=true);
27 virtual bool updateDistance(MatData& colCell, MatData& rowCell) = 0;
29 virtual void clusterBins();
30 virtual void clusterNames();
31 virtual void updateMap();
35 SparseMatrix* dMatrix;
42 map<string, int> seq2Bin;
45 vector<MatVec> seqVec; // contains vectors of cells related to a certain sequence
53 /***********************************************************************/
55 class CompleteLinkage : public Cluster {
57 CompleteLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
58 bool updateDistance(MatData& colCell, MatData& rowCell);
65 /***********************************************************************/
67 class SingleLinkage : public Cluster {
69 SingleLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
71 bool updateDistance(MatData& colCell, MatData& rowCell);
78 /***********************************************************************/
80 class AverageLinkage : public Cluster {
82 AverageLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
83 bool updateDistance(MatData& colCell, MatData& rowCell);
95 /***********************************************************************/
97 class WeightedLinkage : public Cluster {
99 WeightedLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string);
100 bool updateDistance(MatData& colCell, MatData& rowCell);
108 /***********************************************************************/