]> git.donarmstrong.com Git - mothur.git/blob - pam.h
working on get.communitytype command
[mothur.git] / pam.h
1 //
2 //  pam.h
3 //  Mothur
4 //
5 //  Created by SarahsWork on 12/10/13.
6 //  Copyright (c) 2013 Schloss Lab. All rights reserved.
7 //
8
9 #ifndef Mothur_pam_h
10 #define Mothur_pam_h
11
12 #include "communitytype.h"
13
14 /**************************************************************************************************/
15
16 class Pam : public CommunityTypeFinder {
17     
18 public:
19     Pam(vector<vector<int> >, vector<vector<double> >, int);
20     double calcCHIndex(vector< vector< double> >);
21     
22 private:
23     set<int> medoids;
24     map<int, int> medoid2Partition;
25     double largestDist;
26     vector<vector<double> > dists;
27     vector<vector< double> > Dp; // [numSamples][2] - It contains Dp and Ep. Dp is in [numSamples][0] and Ep is in [numSamples][1]. Dp is the distance between p and the closest sample in S and Ep is the distance between p and the second closest object in S. Both are used in the build and swap phases.
28     
29     int buildPhase();
30     int swapPhase();
31     int updateDp();
32     
33     
34     
35 /**************************************************************************************************/
36 };
37
38
39 #endif