]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedordervector.cpp
added get.groups and remove.groups commands
[mothur.git] / sharedordervector.cpp
index e1ede6d0e8048ee46cdc38b33ef47b76ffa03624..15ee7fc4e414988f86bca49ccd38070a2d96ef22 100644 (file)
@@ -57,7 +57,7 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
                        }
                }
                
-               gobble(f); 
+               m->gobble(f); 
                
                if (f.eof() != true) { f >> nextLabel; }
                
@@ -81,7 +81,7 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
                                }
                        }
                        
-                       gobble(f);
+                       m->gobble(f);
                                
                        if (f.eof() != true) { f >> nextLabel; }
 
@@ -96,7 +96,7 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
                
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "SharedOrderVector");
+               m->errorOut(e, "SharedOrderVector", "SharedOrderVector");
                exit(1);
        }
 }
@@ -166,16 +166,23 @@ void SharedOrderVector::print(ostream& output){
                output << endl;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "print");
+               m->errorOut(e, "SharedOrderVector", "print");
                exit(1);
        }
 }
 
+/***********************************************************************/
 
+void SharedOrderVector::clear(){
+       numBins = 0;
+       maxRank = 0;
+       numSeqs = 0;
+       data.clear();
+}
 /***********************************************************************/
 
 void SharedOrderVector::resize(int){
-       mothurOut("resize() did nothing in class SharedOrderVector");
+       m->mothurOut("resize() did nothing in class SharedOrderVector");
 }
 
 /***********************************************************************/
@@ -218,7 +225,7 @@ RAbundVector SharedOrderVector::getRAbundVector(){
                return rav;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getRAbundVector");
+               m->errorOut(e, "SharedOrderVector", "getRAbundVector");
                exit(1);
        }
 }
@@ -238,7 +245,7 @@ OrderVector SharedOrderVector::getOrderVector(map<string,int>* nameMap = NULL) {
                return ov;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getOrderVector");
+               m->errorOut(e, "SharedOrderVector", "getOrderVector");
                exit(1);
        }
 }
@@ -268,7 +275,7 @@ SharedRAbundVector SharedOrderVector::getSharedRAbundVector(string group) {
                return sharedRav;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
+               m->errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
                exit(1);
        }
 }
@@ -285,7 +292,7 @@ vector<SharedRAbundVector*> SharedOrderVector::getSharedRAbundVector() {
                return lookup;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
+               m->errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
                exit(1);
        }
 }
@@ -298,7 +305,7 @@ SharedSAbundVector SharedOrderVector::getSharedSAbundVector(string group) {
                                
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getSharedSAbundVector");
+               m->errorOut(e, "SharedOrderVector", "getSharedSAbundVector");
                exit(1);
        }
 }
@@ -333,7 +340,7 @@ void SharedOrderVector::updateStats(){
                
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "updateStats");
+               m->errorOut(e, "SharedOrderVector", "updateStats");
                exit(1);
        }
 }