X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=hcluster.cpp;fp=hcluster.cpp;h=72af7c8423ac38032de4455800b171f2114d1eac;hb=64ead0dc966e9a9768a24c8f55518db83ed2e82f;hp=4e8c9945bd11574cfc7c15b6411343fd79576b6b;hpb=b5a791c81d432082bf38755a08b33863f255341d;p=mothur.git diff --git a/hcluster.cpp b/hcluster.cpp index 4e8c994..72af7c8 100644 --- a/hcluster.cpp +++ b/hcluster.cpp @@ -280,7 +280,8 @@ void HCluster::update(int row, int col, float distance){ bool cluster = false; if (method == "nearest") { cluster = true; } - else if (method == "average") { cout << "still working on this... " << endl; //got to figure this out + else if (method == "average") { + if (linkValue == (ceil(((clusterArray[smallRow].numSeq * clusterArray[smallCol].numSeq)) / (float) 2.0))) { cluster = true; } }else{ //assume furthest if (linkValue == (clusterArray[smallRow].numSeq * clusterArray[smallCol].numSeq)) { cluster = true; } }