]> git.donarmstrong.com Git - mothur.git/blobdiff - treemap.h
parsimony command now uses groups, fixed bug with unweighted groups
[mothur.git] / treemap.h
index 20bbcfee7090f0aad18e9eee8324358a2f69c5ba..60fb924278c8df36a405ca363c2584d5ae2fa42a 100644 (file)
--- a/treemap.h
+++ b/treemap.h
@@ -9,7 +9,6 @@
  *
  */
 
-#include <Carbon/Carbon.h>
 #include <map>
 #include <string>
 #include <iostream>
@@ -27,6 +26,7 @@ struct GroupIndex {
 
 class TreeMap {
 public:
+       TreeMap() {};
        TreeMap(string);
        ~TreeMap();
        void readMap();
@@ -34,9 +34,12 @@ public:
        int getNumSeqs();
        void setIndex(string, int);  //sequencename, index
        int getIndex(string);           //returns vector index of sequence
+       bool isValidGroup(string);  //return true if string is a valid group
        string getGroup(string);
        vector<string> namesOfGroups;
        vector<string> namesOfSeqs;
+    map<string,int> seqsPerGroup;      //groupname, number of seqs in that group.
+       map<string, GroupIndex> treemap; //sequence name and <groupname, vector index>
        void print(ostream&);
        
 private:
@@ -44,8 +47,9 @@ private:
        string groupFileName;
        int numGroups;
        map<string, GroupIndex>::iterator it;
+       map<string, int>::iterator it2;
        void setNamesOfGroups(string); 
-       map<string, GroupIndex> treemap; //sequence name and groupname
+       
 };
 
-#endif
\ No newline at end of file
+#endif