]> git.donarmstrong.com Git - mothur.git/blob - weighted.h
working on parallelizing unifrac.weighted.
[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) : tmap(t) {};
23                 ~Weighted() {};
24                 
25                 EstOutput getValues(Tree*, string, string, vector<double>&);
26                 EstOutput getValues(Tree*, int, string);
27                 
28                 vector<double> getBranchLengthSums(Tree*);
29                 
30         private:
31                 struct linePair {
32                         int start;
33                         int num;
34                         linePair(int i, int j) : start(i), num(j) {}
35                 };
36                 vector<linePair*> lines;
37
38                 GlobalData* globaldata;
39                 EstOutput data;
40                 TreeMap* tmap;
41                 map<string, int>::iterator it;
42                 map<string, double> WScore; //a score for each group combination i.e. AB, AC, BC.
43                 int processors;
44                 string outputDir;
45                 
46                 EstOutput driver(Tree*, vector< vector<string> >, int, int, vector<double>&); 
47                 EstOutput createProcesses(Tree*, vector< vector<string> >, vector<double>&);
48 };
49
50 /***********************************************************************/
51
52
53 #endif