]> git.donarmstrong.com Git - mothur.git/blobdiff - singlelinkage.cpp
changed reading of name file to use buffered reads. note the splitAtWhiteSpace functi...
[mothur.git] / singlelinkage.cpp
index c27b14e727057c6dcd14f2b0268cd250c4d52559..1a1b2aee36bed8af6b7d9782e54adcdedc04d466 100644 (file)
@@ -5,8 +5,8 @@
 
 /***********************************************************************/
 
-SingleLinkage::SingleLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm) :
-Cluster(rav, lv, dm)
+SingleLinkage::SingleLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm, float c, string s) :
+Cluster(rav, lv, dm, c, s)
 {}
 
 
@@ -18,7 +18,7 @@ string SingleLinkage::getTag() {
 
 /***********************************************************************/
 //This function clusters based on the single linkage method.
-void  SingleLinkage::update(){
+void  SingleLinkage::update(double& cutOFF){
        try {
                getRowColCells();       
        
@@ -77,10 +77,11 @@ void  SingleLinkage::update(){
                clusterBins();
                clusterNames();
                // remove also the cell with the smallest distance
+
                removeCell(rowCells[rowInd], -1 , -1);
        }
        catch(exception& e) {
-               errorOut(e, "SingleLinkage", "update");
+               m->errorOut(e, "SingleLinkage", "update");
                exit(1);
        }
 }
@@ -97,7 +98,7 @@ bool SingleLinkage::updateDistance(MatData& colCell, MatData& rowCell) {
                return(changed);
        }
        catch(exception& e) {
-               errorOut(e, "SingleLinkage", "updateDistance");
+               m->errorOut(e, "SingleLinkage", "updateDistance");
                exit(1);
        }
 }