5 // Created by SarahsWork on 1/3/14.
6 // Copyright (c) 2014 Schloss Lab. All rights reserved.
9 #include "shannonrange.h"
11 /***********************************************************************/
13 EstOutput RangeShannon::getValues(vector<SharedRAbundVector*> shared) {
17 double commSize = 1e20;
19 SAbundVector sabund1 = shared[0]->getSAbundVector();
20 SAbundVector sabund2 = shared[1]->getSAbundVector();
22 double sampleSize = 0;
23 for (int i = 0; i < sabund1.getNumBins(); i++) { sampleSize += (sabund1.get(i) * sabund2.get(i)); }
24 int aux = ceil(pow((sampleSize+1), 0.33333));
26 if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }
31 m->errorOut(e, "RangeShannon", "getValues");
35 /***********************************************************************/