]> git.donarmstrong.com Git - mothur.git/blobdiff - weighted.h
added name, group and count files to chop.seqs. added intelligent warnings for when...
[mothur.git] / weighted.h
index 3fa5123a59363ce4697fbead42522e35b78667b9..d4082fe9c82a7aeeb41aeaad62f016d0ec588d4d 100644 (file)
  */
 
 #include "treecalculator.h"
-#include "treemap.h"
+#include "counttable.h"
 
 /***********************************************************************/
 
 class Weighted : public TreeCalculator  {
        
        public:
-               Weighted(TreeMap* t) : tmap(t) {};
+        Weighted( bool r) : includeRoot(r) {};
                ~Weighted() {};
                
-               EstOutput getValues(Tree*, string, string, vector<double>&);
+               EstOutput getValues(Tree*, string, string);
                EstOutput getValues(Tree*, int, string);
                
-               vector<double> getBranchLengthSums(Tree*);
-               
        private:
                struct linePair {
                        int start;
@@ -35,16 +33,17 @@ class Weighted : public TreeCalculator  {
                };
                vector<linePair> lines;
 
-               GlobalData* globaldata;
                EstOutput data;
-               TreeMap* tmap;
                map<string, int>::iterator it;
                map<string, double> WScore; //a score for each group combination i.e. AB, AC, BC.
                int processors;
                string outputDir;
+               map< vector<string>, set<int> > rootForGrouping;  //maps a grouping combo to the root for that combo
+               bool includeRoot;
                
-               EstOutput driver(Tree*, vector< vector<string> >, int, int, vector<double>&); 
-               EstOutput createProcesses(Tree*, vector< vector<string> >, vector<double>&);
+               EstOutput driver(Tree*, vector< vector<string> >, int, int, CountTable*); 
+               EstOutput createProcesses(Tree*, vector< vector<string> >, CountTable*);
+               double getLengthToRoot(Tree*, int, string, string);
 };
 
 /***********************************************************************/