5 * Created by Pat Schloss on 8/21/10.
6 * Copyright 2010 Schloss Lab. All rights reserved.
10 #include "smithwilson.h"
12 /***********************************************************************/
14 EstOutput SmithWilson::getValues(SAbundVector* rank){
19 double maxRank = rank->getMaxRank();
20 double sobs = rank->getNumBins();
23 for(int i=1;i<=maxRank;i++){
24 innerSum += rank->get(i) * log(i);
29 for(int i=1;i<=maxRank;i++){
30 outerSum += rank->get(i) * (log(i) - innerSum) * (log(i) - innerSum);
35 data[0] = 1.0000 - 2.0000 / (3.14159 * atan(outerSum));
45 m->errorOut(e, "InvSimpson", "getValues");
50 /***********************************************************************/