]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.cpp
added sparseDistanceMatrix class. Modified cluster commands to use the new sparse...
[mothur.git] / mothurout.cpp
index 14840c16e162bc599c242e289e3c5899fb396de4..dfcf25b4447d28362dae3f27a4e9cfd27e362d8e 100644 (file)
@@ -2017,6 +2017,28 @@ bool MothurOut::mothurConvert(string item, int& num){
                exit(1);
        }
 }
+/***********************************************************************/
+bool MothurOut::mothurConvert(string item, intDist& num){
+       try {
+               bool error = false;
+               
+               if (isNumeric1(item)) {
+                       convert(item, num);
+               }else {
+                       num = 0;
+                       error = true;
+                       mothurOut("[ERROR]: cannot convert " + item + " to an integer."); mothurOutEndLine();
+                       commandInputsConvertError = true;
+               }
+               
+               return error;
+       }
+       catch(exception& e) {
+               errorOut(e, "MothurOut", "mothurConvert");
+               exit(1);
+       }
+}
+
 /***********************************************************************/
 bool MothurOut::isNumeric1(string stringToCheck){
        try {