]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedrabundfloatvector.cpp
changes while testing
[mothur.git] / sharedrabundfloatvector.cpp
index b6d916a1900edc643291df4432728d3619a711a6..71c868b158ab41c2b8d72e7dac301998e2c39537 100644 (file)
@@ -129,7 +129,6 @@ SharedRAbundFloatVector::SharedRAbundFloatVector(ifstream& f) : DataVector(), ma
                while ((nextLabel == holdLabel) && (f.eof() != true)) {
                        f >> groupN >> num;
             
-            if (num != 1000) { break; }
                        count++;
                        
                        allGroups.push_back(groupN);
@@ -153,7 +152,6 @@ SharedRAbundFloatVector::SharedRAbundFloatVector(ifstream& f) : DataVector(), ma
                
                m->saveNextLabel = nextLabel;
                m->setAllGroups(allGroups);
-       
        }
        catch(exception& e) {
                m->errorOut(e, "SharedRAbundFloatVector", "SharedRAbundFloatVector");
@@ -193,6 +191,16 @@ float SharedRAbundFloatVector::getAbundance(int index){
        return data[index].abundance;   
 }
 /***********************************************************************/
+//returns vector of abundances
+vector<float> SharedRAbundFloatVector::getAbundances(){
+    vector<float> abunds;
+    for (int i = 0; i < data.size(); i++) {
+        abunds.push_back(data[i].abundance);
+    }
+    
+       return abunds;
+}
+/***********************************************************************/
 individualFloat SharedRAbundFloatVector::get(int index){
        return data[index];     
 }