* coverage.cpp
* Mothur
*
- * Created by Sarah Westcott on 3/9/09.
- * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
+ * Created by Pat Schloss on 4/22/09.
+ * Copyright 2009 Patrick D. Schloss. All rights reserved.
*
*/
#include "coverage.h"
-//**********************************************************************************************************************
-vector< vector<float> > Coverage::getValues(FullMatrix*, float) {
+/***********************************************************************/
+EstOutput Coverage::getValues(SAbundVector* rank){
+
try {
- globaldata = GlobalData::getInstance();
- numGroups = globaldata->Groups.size();
-
- //initialize data
- data.resize(numGroups);
- for (int l = 0; l < data.size(); l++) {
- data[l].push_back(0.0);
- }
+ data.resize(1,0);
- /**************************************/
- //get the minumums for each comparision
- /**************************************/
+ data[0] = 1. - rank->get(1) / (double)rank->getNumSeqs();
+
return data;
}
catch(exception& e) {
cout << "An unknown error has occurred in the Coverage class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
-}
-//**********************************************************************************************************************
+};
+
-
\ No newline at end of file
+/***********************************************************************/