5 * Created by westcott on 12/15/10.
6 * Copyright 2010 Schloss Lab. All rights reserved.
10 #include "speciesprofile.h"
12 /***********************************************************************/
13 EstOutput SpeciesProfile::getValues(vector<SharedRAbundVector*> shared) {
20 for (int i = 0; i < shared[0]->getNumBins(); i++) {
21 sumA += shared[0]->getAbundance(i);
22 sumB += shared[1]->getAbundance(i);
26 for (int i = 0; i < shared[0]->getNumBins(); i++) {
27 int A = shared[0]->getAbundance(i);
28 int B = shared[1]->getAbundance(i);
30 sum += (((A / sumA) - (B / sumB)) * ((A / sumA) - (B / sumB)));
35 if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }
40 m->errorOut(e, "SpeciesProfile", "getValues");
44 /***********************************************************************/