]> git.donarmstrong.com Git - mothur.git/blob - completelinkage.cpp
added warning about merging with something above cutoff to cluster. working on chimeras
[mothur.git] / completelinkage.cpp
1
2 #include "cluster.hpp"
3
4 /***********************************************************************/
5
6 CompleteLinkage::CompleteLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm, float c, string s) :
7         Cluster(rav, lv, dm, c, s)
8 {}
9
10 /***********************************************************************/
11 //This function returns the tag of the method.
12 string CompleteLinkage::getTag() {
13         return("fn");
14 }
15
16
17 /***********************************************************************/
18 //This function updates the distance based on the furthest neighbor method.
19 bool CompleteLinkage::updateDistance(MatData& colCell, MatData& rowCell) {
20         try {
21                 bool changed = false;
22                 if (colCell->dist < rowCell->dist) {
23                         colCell->dist = rowCell->dist;
24                         changed = true;
25                 }       
26                 return(changed);
27         }
28         catch(exception& e) {
29                 errorOut(e, "CompleteLinkage", "updateDistance");
30                 exit(1);
31         }
32 }
33
34 /***********************************************************************/