]> git.donarmstrong.com Git - mothur.git/blobdiff - smithwilson.cpp
moved mothur's source into a folder to make grabbing just the source easier on github
[mothur.git] / smithwilson.cpp
diff --git a/smithwilson.cpp b/smithwilson.cpp
deleted file mode 100644 (file)
index ec04196..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  smithwilson.cpp
- *  Mothur
- *
- *  Created by Pat Schloss on 8/21/10.
- *  Copyright 2010 Schloss Lab. All rights reserved.
- *
- */
-
-#include "smithwilson.h"
-
-/***********************************************************************/
-
-EstOutput SmithWilson::getValues(SAbundVector* rank){
-       try {
-
-               data.resize(1,0);
-
-               double maxRank = rank->getMaxRank();
-               double sobs = rank->getNumBins();
-               
-               double innerSum = 0;
-               for(int i=1;i<=maxRank;i++){
-                       innerSum += rank->get(i) * log(i);
-               }
-               innerSum /= sobs;
-
-               double outerSum = 0;
-               for(int i=1;i<=maxRank;i++){
-                       outerSum += rank->get(i) * (log(i) - innerSum) * (log(i) - innerSum);
-               }
-               outerSum /= sobs;
-
-               if(outerSum > 0){
-                       data[0] = 1.0000 - 2.0000 / (3.14159 * atan(outerSum));
-               }
-               else{
-                       data[0] = 1.0000;
-               }
-               
-               
-               return data;
-       }
-       catch(exception& e) {
-               m->errorOut(e, "InvSimpson", "getValues");
-               exit(1);
-       }
-}
-
-/***********************************************************************/