]> git.donarmstrong.com Git - mothur.git/blob - pam.h
993017663a490702280d0d4e42854cc6b608ce30
[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     vector<double> calcSilhouettes(vector< vector< double> >);
21     double calcCHIndex(vector< vector< double> >);
22     
23 private:
24     set<int> medoids;
25     map<int, int> medoid2Partition;
26     double largestDist;
27     vector<vector<double> > dists;
28     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.
29     
30     int buildPhase();
31     int swapPhase();
32     int updateDp();
33     
34     
35     
36 /**************************************************************************************************/
37 };
38
39
40 #endif