X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedrabundvector.cpp;h=f60562a75a5202a366a6bf9cbd831421133feab0;hb=753dc84cf289b1d5dc0ca5b0c043640927aa951a;hp=386017d9367f7eed2e5bfd984ffedb775a26a31a;hpb=6f9dc7ca71d7b8ed4aba2824f76ae6b29da89f3b;p=mothur.git diff --git a/sharedrabundvector.cpp b/sharedrabundvector.cpp index 386017d..f60562a 100644 --- a/sharedrabundvector.cpp +++ b/sharedrabundvector.cpp @@ -7,9 +7,6 @@ * */ - -using namespace std; - #include "sharedrabundvector.h" #include "sabundvector.hpp" #include "ordervector.hpp" @@ -18,11 +15,12 @@ using namespace std; /***********************************************************************/ -SharedRAbundVector::SharedRAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0) {}; +SharedRAbundVector::SharedRAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0) {globaldata = GlobalData::getInstance();} /***********************************************************************/ SharedRAbundVector::SharedRAbundVector(int n) : DataVector(), maxRank(0), numBins(n), numSeqs(0) { + globaldata = GlobalData::getInstance(); individual newGuy; //initialize data for (int i=0; i< n; i++) { @@ -30,7 +28,7 @@ SharedRAbundVector::SharedRAbundVector(int n) : DataVector(), maxRank(0), numBin newGuy.abundance = 0; data.push_back(newGuy); } -}; +} /*********************************************************************** @@ -138,7 +136,7 @@ SharedRAbundVector::SharedRAbundVector(ifstream& f) : DataVector(), maxRank(0), //put file pointer back since you are now at a new distance label f.seekg(pos, ios::beg); - if (globaldata->gGroupmap == NULL) { globaldata->gGroupmap = groupmap; } + if (globaldata->gGroupmap == NULL) { globaldata->gGroupmap = groupmap; } } catch(exception& e) { @@ -153,12 +151,6 @@ SharedRAbundVector::SharedRAbundVector(ifstream& f) : DataVector(), maxRank(0), /***********************************************************************/ -SharedRAbundVector::~SharedRAbundVector() { - -} - -/***********************************************************************/ - void SharedRAbundVector::set(int binNumber, int newBinSize, string groupname){ try { int oldBinSize = data[binNumber].abundance;