]> git.donarmstrong.com Git - mothur.git/blobdiff - groupmap.cpp
ccode working - still need to paralellize
[mothur.git] / groupmap.cpp
index 1f22013699014c6afa0b6de5b7ce1722c43acbc0..dd6f924ccdf661f4c376020e7f5459bc840cf895 100644 (file)
@@ -18,7 +18,7 @@
 }
 
 /************************************************************/
- GroupMap::~GroupMap(){};
+ GroupMap::~GroupMap(){}
 
 /************************************************************/
 void GroupMap::readMap() {
@@ -71,3 +71,17 @@ void GroupMap::setNamesOfGroups(string seqGroup) {
                                index++;
                        }
 }
+/************************************************************/
+bool GroupMap::isValidGroup(string groupname) {
+       try {
+               for (int i = 0; i < namesOfGroups.size(); i++) {
+                       if (groupname == namesOfGroups[i]) { return true; }
+               }
+               
+               return false;
+       }
+       catch(exception& e) {
+               errorOut(e, "GroupMap", "isValidGroup");
+               exit(1);
+       }
+}