]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.h
added concensus command and updated calcs
[mothur.git] / mothur.h
index 36d7b28ebf45dd3f4bf1d0555c74f4e99c841fe9..8ad1645a57a5345a7f48ca8236d83963d8700afc 100644 (file)
--- a/mothur.h
+++ b/mothur.h
@@ -42,7 +42,15 @@ using namespace std;
 
 typedef unsigned long long ull;
 
-
+struct IntNode {
+       int lvalue;
+       int rvalue;
+       int lcoef;
+       int rcoef;
+       IntNode* left;
+       IntNode* right;
+};
+       
 /***********************************************************************/
 
 // snagged from http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.2
@@ -95,7 +103,6 @@ string toHex(const T&x){
 
     return output.str();
 }
-
 //**********************************************************************************************************************
 
 template<typename T>
@@ -203,6 +210,17 @@ inline string getSimpleName(string longName){
 
        return simpleName;
 }
+/***********************************************************************/
+
+inline int factorial(int num){
+       int total = 1;
+       
+       for (int i = 1; i <= num; i++) {
+               total *= i;
+       }
+       
+       return total;
+}
 
 /***********************************************************************/