X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=fullmatrix.cpp;h=4451d6645ea8691b941ebbc991f82cc4ce8b4706;hb=6b32d112bb60e9f7eb6d4407a4eed4c49b67bced;hp=fe61307552b67bdc4567d00025e1a1401a9e70f3;hpb=e0fbf58358a72f20352cf2a43922ab6b5bdf0cf8;p=mothur.git diff --git a/fullmatrix.cpp b/fullmatrix.cpp index fe61307..4451d66 100644 --- a/fullmatrix.cpp +++ b/fullmatrix.cpp @@ -11,11 +11,9 @@ /**************************************************************************/ //This constructor reads a distance matrix file and stores the data in the matrix. -FullMatrix::FullMatrix(ifstream& filehandle) { +FullMatrix::FullMatrix(ifstream& filehandle, GroupMap* g, bool s) : groupmap(g), sim(s) { try{ m = MothurOut::getInstance(); - globaldata = GlobalData::getInstance(); - groupmap = globaldata->gGroupmap; string name, group; @@ -45,7 +43,7 @@ FullMatrix::FullMatrix(ifstream& filehandle) { for(int i=0;i> matrix[0][i]; - if (globaldata->sim) { matrix[0][i] = 1.0 - matrix[0][i]; } + if (sim) { matrix[0][i] = 1.0 - matrix[0][i]; } } break; } @@ -95,7 +93,7 @@ int FullMatrix::readSquareMatrix(ifstream& filehandle) { if (m->control_pressed) { delete reading; return 0; } filehandle >> matrix[i][j]; - if (globaldata->sim) { matrix[i][j] = 1.0 - matrix[i][j]; } + if (sim) { matrix[i][j] = 1.0 - matrix[i][j]; } count++; reading->update(count); @@ -139,7 +137,7 @@ int FullMatrix::readLTMatrix(ifstream& filehandle) { if (m->control_pressed) { delete reading; return 0; } filehandle >> distance; - if (globaldata->sim) { distance = 1.0 - distance; } + if (sim) { distance = 1.0 - distance; } matrix[i][j] = distance; matrix[j][i] = distance;