]> git.donarmstrong.com Git - mothur.git/blobdiff - rabundvector.cpp
pat's ../ bug fix
[mothur.git] / rabundvector.cpp
index ce04df11ccd769a233ce30bfdf0554f34377d6cd..e01063dad484f2328a714b0cbf8cff15c445b169 100644 (file)
@@ -193,6 +193,19 @@ vector<int>::reverse_iterator RAbundVector::rend(){
        return data.rend();                                     
 }
 
+/***********************************************************************/
+void RAbundVector::nonSortedPrint(ostream& output){
+       try {   
+               output << label << '\t' << numBins << '\t';
+       
+               for(int i=0;i<numBins;i++){             output << data[i] << '\t';              }
+               output << endl;
+       }
+       catch(exception& e) {
+               errorOut(e, "RAbundVector", "nonSortedPrint");
+               exit(1);
+       }
+}
 /***********************************************************************/
 void RAbundVector::print(string prefix, ostream& output){
        try {   
@@ -210,6 +223,7 @@ void RAbundVector::print(string prefix, ostream& output){
        }
 }
 
+
 /***********************************************************************/
 void RAbundVector::print(ostream& output){
        try {
@@ -275,15 +289,16 @@ SAbundVector RAbundVector::getSAbundVector() {
 OrderVector RAbundVector::getOrderVector(map<string,int>* nameMap = NULL) {
        try {
                OrderVector ov;
-       
+
                for(int i=0;i<data.size();i++){
                        for(int j=0;j<data[i];j++){
                                ov.push_back(i);
                        }
                }
                random_shuffle(ov.begin(), ov.end());
-
                ov.setLabel(label);     
+               ov.getNumBins();
+
                return ov;
        }
        catch(exception& e) {