#ifndef AVERAGE_H
#define AVERAGE_H
-
+//test
#include "mothur.h"
#include "cluster.hpp"
#include "rabundvector.hpp"
/***********************************************************************/
-AverageLinkage::AverageLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm, float c) :
- Cluster(rav, lv, dm, c)
+AverageLinkage::AverageLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm, float c, string s) :
+ Cluster(rav, lv, dm, c, s)
{
saveRow = -1;
saveCol = -1;
saveCol = smallCol;
}
- float oldColCell = colCell->dist;
-
colCell->dist = (colBin * colCell->dist + rowBin * rowCell->dist) / totalBin;
- //warn user if merge with value above cutoff produces a value below cutoff
- if ((colCell->dist < cutoff) && ((oldColCell > cutoff) || (rowCell->dist > cutoff)) ) {
- mothurOut("Warning: merging " + toString(oldColCell) + " with " + toString(rowCell->dist) + ", new value = " + toString(colCell->dist) + ". Results will differ from those if cutoff was used in the read.dist command."); mothurOutEndLine();
- }
-
return(true);
}
catch(exception& e) {
- errorOut(e, "AverageLinkage", "updateDistance");
+ m->errorOut(e, "AverageLinkage", "updateDistance");
exit(1);
}
}