X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=libshuff.cpp;h=5f1bdefe6ea95e36c6b30800a690af2ceecb1fbb;hp=e6c83f7a42b20cb674675fd6608f9da5dd9f7fa6;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=9354b70bb84f6dd52ff4a1955754bcbf7edeedbf diff --git a/libshuff.cpp b/libshuff.cpp index e6c83f7..5f1bdef 100644 --- a/libshuff.cpp +++ b/libshuff.cpp @@ -17,13 +17,14 @@ void swap(int& i,int& j){ int t = i; i = j; j = t; } Libshuff::Libshuff(FullMatrix* D, int it, float step, float co) : matrix(D), iters(it), stepSize(step), cutOff(co){ try{ + m = MothurOut::getInstance(); groupNames = matrix->getGroups(); groupSizes = matrix->getSizes(); numGroups = matrix->getNumGroups(); initializeGroups(matrix); } catch(exception& e) { - errorOut(e, "Libshuff", "Libshuff"); + m->errorOut(e, "Libshuff", "Libshuff"); exit(1); } } @@ -49,7 +50,7 @@ void Libshuff::initializeGroups(FullMatrix* matrix){ } } catch(exception& e) { - errorOut(e, "Libshuff", "initializeGroups"); + m->errorOut(e, "Libshuff", "initializeGroups"); exit(1); } } @@ -64,7 +65,6 @@ vector > > Libshuff::getSavedMins(){ vector Libshuff::getMinX(int x){ try{ - vector minX(groupSizes[x], 0); for(int i=0;i 1 ? (i==0 ? matrix->get(groups[x][0], groups[x][1]) : matrix->get(groups[x][i], groups[x][0])) : 0.0); //get the first value in row i of this block @@ -79,7 +79,7 @@ vector Libshuff::getMinX(int x){ return minX; } catch(exception& e) { - errorOut(e, "Libshuff", "getMinX"); + m->errorOut(e, "Libshuff", "getMinX"); exit(1); } } @@ -100,7 +100,7 @@ vector Libshuff::getMinXY(int x, int y){ return minXY; } catch(exception& e) { - errorOut(e, "Libshuff", "getMinXY"); + m->errorOut(e, "Libshuff", "getMinXY"); exit(1); } } @@ -126,7 +126,7 @@ void Libshuff::randomizeGroups(int x, int y){ for(int k=0;kerrorOut(e, "Libshuff", "randomizeGroups"); exit(1); } }