]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedrabundvector.cpp
added get.metacommunity command.
[mothur.git] / sharedrabundvector.cpp
index 3901650cef965dc7a3c0126ecb54a8fb425e434d..7bc333bc02e737f7caab1f4b4d34ec0c131dc2dd 100644 (file)
@@ -211,6 +211,18 @@ int SharedRAbundVector::getAbundance(int index){
        return data[index].abundance;
        
 }
+/***********************************************************************/
+//returns vector of abundances 
+vector<int> SharedRAbundVector::getAbundances(){
+    vector<int> abunds;
+    for (int i = 0; i < data.size(); i++) {
+        abunds.push_back(data[i].abundance);
+    }
+    
+       return abunds;
+}
+
+
 /***********************************************************************/
 
 int SharedRAbundVector::numNZ(){