]> git.donarmstrong.com Git - mothur.git/blob - weighted.h
added root parameter to the unifrac commands so you can choose to include the entire...
[mothur.git] / weighted.h
1 #ifndef WEIGHTED_H
2 #define WEIGHTED_H
3
4
5 /*
6  *  weighted.h
7  *  Mothur
8  *
9  *  Created by Sarah Westcott on 2/9/09.
10  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
11  *
12  */
13
14 #include "treecalculator.h"
15 #include "treemap.h"
16
17 /***********************************************************************/
18
19 class Weighted : public TreeCalculator  {
20         
21         public:
22                 Weighted(TreeMap* t, bool r) : tmap(t), includeRoot(r) {};
23                 ~Weighted() {};
24                 
25                 EstOutput getValues(Tree*, string, string);
26                 EstOutput getValues(Tree*, int, string);
27                 
28         private:
29                 struct linePair {
30                         int start;
31                         int num;
32                         linePair(int i, int j) : start(i), num(j) {}
33                 };
34                 vector<linePair> lines;
35
36                 GlobalData* globaldata;
37                 EstOutput data;
38                 TreeMap* tmap;
39                 map<string, int>::iterator it;
40                 map<string, double> WScore; //a score for each group combination i.e. AB, AC, BC.
41                 int processors;
42                 string outputDir;
43                 map< vector<string>, set<int> > rootForGrouping;  //maps a grouping combo to the root for that combo
44                 bool includeRoot;
45                 
46                 EstOutput driver(Tree*, vector< vector<string> >, int, int); 
47                 EstOutput createProcesses(Tree*, vector< vector<string> >);
48                 double getLengthToRoot(Tree*, int, string, string);
49 };
50
51 /***********************************************************************/
52
53
54 #endif