]> git.donarmstrong.com Git - mothur.git/blobdiff - treemap.h
added mothur.h and fixed includes in many files
[mothur.git] / treemap.h
index 20bbcfee7090f0aad18e9eee8324358a2f69c5ba..0dc74eec2fad5ebc157b4fd12e63a7b8b37c967a 100644 (file)
--- a/treemap.h
+++ b/treemap.h
@@ -9,11 +9,7 @@
  *
  */
 
-#include <Carbon/Carbon.h>
-#include <map>
-#include <string>
-#include <iostream>
-#include <fstream>
+#include "mothur.h"
 #include "utilities.hpp"
 
 /* This class is used by the read.tree command to build the tree container. */
@@ -27,6 +23,7 @@ struct GroupIndex {
 
 class TreeMap {
 public:
+       TreeMap() {};
        TreeMap(string);
        ~TreeMap();
        void readMap();
@@ -34,9 +31,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 +44,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