]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.h
fixed some bugs
[mothur.git] / mothur.h
index f07f343b05d91148c64ebccc79b7d165bf51c8f7..ec56c506c8c0c7654c4e436afa16222f14b1224f 100644 (file)
--- a/mothur.h
+++ b/mothur.h
@@ -40,6 +40,15 @@ using namespace std;
 #include <cmath>
 #include <math.h>
 #include <algorithm>
+#include <ctime>
+
+#ifdef _WIN32
+       #define exp(x) (exp((double) x))
+       #define sqrt(x) (sqrt((double) x))
+       #define log10(x) (log10((double) x))
+       #define log2(x) (log10(x)/log10(2))
+#endif
+
 
 typedef unsigned long long ull;
 
@@ -51,7 +60,13 @@ struct IntNode {
        IntNode* left;
        IntNode* right;
 };
-       
+
+struct ThreadNode {
+       int* pid;
+       IntNode* left;
+       IntNode* right;
+};
+
 /***********************************************************************/
 
 // snagged from http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.2
@@ -139,6 +154,13 @@ inline void gobble(istream& f){
        f.putback(d);
        
 }
+/***********************************************************************/
+
+inline bool isTrue(string f){
+       
+       if ((f == "TRUE") || (f == "T") || (f == "true") || (f == "t")) {       return true;    }
+       else {  return false;  }
+}
 
 /***********************************************************************/
 
@@ -224,6 +246,7 @@ inline string getSimpleName(string longName){
 
        return simpleName;
 }
+
 /***********************************************************************/
 
 inline int factorial(int num){