X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=ordervector.cpp;h=a6dff32386beb1cfeae07a1aa9f01decee5ea0f1;hp=360c898259f8742446c3488289cf4231221c0703;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=510b1cfc25cd79391d6973ca20c5ec25fb1bb3b2 diff --git a/ordervector.cpp b/ordervector.cpp index 360c898..a6dff32 100644 --- a/ordervector.cpp +++ b/ordervector.cpp @@ -47,7 +47,7 @@ OrderVector::OrderVector(ifstream& f) : DataVector() { updateStats(); } catch(exception& e) { - errorOut(e, "OrderVector", "OrderVector"); + m->errorOut(e, "OrderVector", "OrderVector"); exit(1); } } @@ -73,7 +73,14 @@ int OrderVector::getMaxRank(){ if(needToUpdate == 1){ updateStats(); } return maxRank; } +/***********************************************************************/ +void OrderVector::clear(){ + numBins = 0; + maxRank = 0; + numSeqs = 0; + data.clear(); +} /***********************************************************************/ @@ -112,7 +119,7 @@ void OrderVector::print(ostream& output){ output << endl; } catch(exception& e) { - errorOut(e, "OrderVector", "print"); + m->errorOut(e, "OrderVector", "print"); exit(1); } } @@ -129,7 +136,7 @@ void OrderVector::print(string prefix, ostream& output){ output << endl; } catch(exception& e) { - errorOut(e, "OrderVector", "print"); + m->errorOut(e, "OrderVector", "print"); exit(1); } } @@ -137,7 +144,7 @@ void OrderVector::print(string prefix, ostream& output){ /***********************************************************************/ void OrderVector::resize(int){ - mothurOut("resize() did nothing in class OrderVector"); + m->mothurOut("resize() did nothing in class OrderVector"); } /***********************************************************************/ @@ -179,7 +186,7 @@ RAbundVector OrderVector::getRAbundVector(){ return rav; } catch(exception& e) { - errorOut(e, "OrderVector", "getRAbundVector"); + m->errorOut(e, "OrderVector", "getRAbundVector"); exit(1); } } @@ -228,7 +235,7 @@ void OrderVector::updateStats(){ } } catch(exception& e) { - errorOut(e, "OrderVector", "updateStats"); + m->errorOut(e, "OrderVector", "updateStats"); exit(1); } }