X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=weightedlinkage.cpp;h=19c41ce555b87ed296e134bf6d403752a07b5159;hb=f320651dfb5359e6bba597280753553de28a2154;hp=0851bd7ef94392ac2b2e269c16082981a7a0445a;hpb=edd8b9d9392a99e0b1527507de3a4ca8fabfc1c6;p=mothur.git diff --git a/weightedlinkage.cpp b/weightedlinkage.cpp index 0851bd7..19c41ce 100644 --- a/weightedlinkage.cpp +++ b/weightedlinkage.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ -WeightedLinkage::WeightedLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm, float c, string s) : +WeightedLinkage::WeightedLinkage(RAbundVector* rav, ListVector* lv, SparseDistanceMatrix* dm, float c, string s) : Cluster(rav, lv, dm, c, s) { saveRow = -1; @@ -28,7 +28,7 @@ string WeightedLinkage::getTag() { /***********************************************************************/ //This function updates the distance based on the average linkage method. -bool WeightedLinkage::updateDistance(MatData& colCell, MatData& rowCell) { +bool WeightedLinkage::updateDistance(PDistCell& colCell, PDistCell& rowCell) { try { if ((saveRow != smallRow) || (saveCol != smallCol)) { // rowBin = rabund->get(smallRow); @@ -38,7 +38,7 @@ bool WeightedLinkage::updateDistance(MatData& colCell, MatData& rowCell) { saveCol = smallCol; } - colCell->dist = (colCell->dist + rowCell->dist) / 2.0; + colCell.dist = (colCell.dist + rowCell.dist) / 2.0; return(true); }