]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.h
fixed blast code path problem
[mothur.git] / mothur.h
index c1d93ed197fe2990c24ca2ba0d89f52f8fe8320e..2c9595ebe53c4055179f2297372bb1e691fff8ab 100644 (file)
--- a/mothur.h
+++ b/mothur.h
@@ -222,6 +222,13 @@ inline int factorial(int num){
        
        return total;
 }
+/**************************************************************************************************
+
+double min(double x, double y)
+{
+    if(x<y){   return x;    }
+    else   {   return y;    }
+}
 
 /***********************************************************************/
 
@@ -266,6 +273,21 @@ inline int openOutputFile(string fileName, ofstream& fileHandle){
        }
 
 }
+/***********************************************************************/
+
+inline int openOutputFileAppend(string fileName, ofstream& fileHandle){
+       
+       fileHandle.open(fileName.c_str(), ios::app);
+       if(!fileHandle) {
+               cerr << "Error: Could not open " << fileName << endl;
+               return 1;
+       }
+       else {
+               return 0;
+       }
+
+}
+
 
 /***********************************************************************/