6 #include "sparsematrix.hpp"
11 typedef vector<MatData> MatVec;
16 Cluster(RAbundVector*, ListVector*, SparseMatrix*);
17 virtual void update();
18 virtual string getTag() = 0;
21 void getRowColCells();
22 void removeCell(const MatData& cell, int vrow, int vcol, bool rmMatrix=true);
24 virtual bool updateDistance(MatData& colCell, MatData& rowCell) = 0;
26 virtual void clusterBins();
27 virtual void clusterNames();
31 SparseMatrix* dMatrix;
37 vector<MatVec> seqVec; // contains vectors of cells related to a certain sequence
\r
44 /***********************************************************************/
46 class CompleteLinkage : public Cluster {
48 CompleteLinkage(RAbundVector*, ListVector*, SparseMatrix*);
49 bool updateDistance(MatData& colCell, MatData& rowCell);
56 /***********************************************************************/
58 class SingleLinkage : public Cluster {
60 SingleLinkage(RAbundVector*, ListVector*, SparseMatrix*);
62 bool updateDistance(MatData& colCell, MatData& rowCell);
69 /***********************************************************************/
71 class AverageLinkage : public Cluster {
73 AverageLinkage(RAbundVector*, ListVector*, SparseMatrix*);
74 bool updateDistance(MatData& colCell, MatData& rowCell);
86 /***********************************************************************/