X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedrabundfloatvector.cpp;h=52ffbb89b3137cf724ac9ae1adc501f85c2dbe4e;hb=1d5962b46d9e72a2b855b4176d1c47df9a163fac;hp=84b1cf56d60fc4f046218f2e5422e32fcad4ea21;hpb=c6e5f84783b39a558119835963dec3c4facb0154;p=mothur.git diff --git a/sharedrabundfloatvector.cpp b/sharedrabundfloatvector.cpp index 84b1cf5..52ffbb8 100644 --- a/sharedrabundfloatvector.cpp +++ b/sharedrabundfloatvector.cpp @@ -131,11 +131,20 @@ void SharedRAbundFloatVector::set(int binNumber, float newBinSize, string groupn numSeqs += (newBinSize - oldBinSize); } catch(exception& e) { - m->errorOut(e, "SharedRAbundVector", "set"); + m->errorOut(e, "SharedRAbundFloatVector", "set"); exit(1); } } +/***********************************************************************/ +void SharedRAbundFloatVector::clear(){ + numBins = 0; + maxRank = 0; + numSeqs = 0; + data.clear(); + for (int i = 0; i < lookup.size(); i++) { delete lookup[i]; lookup[i] = NULL; } + lookup.clear(); +} /***********************************************************************/ float SharedRAbundFloatVector::getAbundance(int index){ return data[index].abundance;