From: westcott Date: Wed, 23 Jun 2010 19:41:53 +0000 (+0000) Subject: fixed bug with cluster class. when we added the change for average neighbor to update... X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=6e8fce385a566f51350274309503d7405e5b9f35 fixed bug with cluster class. when we added the change for average neighbor to update the cutoff, we did not also pass the cutoff to single linkage. so because of inheritance cluster its instead of the update in singlelinkage. --- diff --git a/cluster.cpp b/cluster.cpp index d0a83cf..a766e08 100644 --- a/cluster.cpp +++ b/cluster.cpp @@ -205,7 +205,6 @@ void Cluster::clusterNames(){ void Cluster::update(double& cutOFF){ try { getRowColCells(); -//cout << "got rowcells" << endl; vector foundCol(nColCells, 0); diff --git a/cluster.hpp b/cluster.hpp index aa517a0..d7c2737 100644 --- a/cluster.hpp +++ b/cluster.hpp @@ -67,7 +67,7 @@ private: class SingleLinkage : public Cluster { public: SingleLinkage(RAbundVector*, ListVector*, SparseMatrix*, float, string); - void update(); + void update(double&); bool updateDistance(MatData& colCell, MatData& rowCell); string getTag(); diff --git a/singlelinkage.cpp b/singlelinkage.cpp index fe5adca..1a1b2ae 100644 --- a/singlelinkage.cpp +++ b/singlelinkage.cpp @@ -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,6 +77,7 @@ void SingleLinkage::update(){ clusterBins(); clusterNames(); // remove also the cell with the smallest distance + removeCell(rowCells[rowInd], -1 , -1); } catch(exception& e) {