]> git.donarmstrong.com Git - mothur.git/blob - kmeans.h
97dfb681f49d865708a044a06a5a46e91bae8f5c
[mothur.git] / kmeans.h
1 //
2 //  kmeans.h
3 //  Mothur
4 //
5 //  Created by SarahsWork on 12/4/13.
6 //  Copyright (c) 2013 Schloss Lab. All rights reserved.
7 //
8
9 #ifndef Mothur_kmeans_h
10 #define Mothur_kmeans_h
11
12 #include "communitytype.h"
13
14 /**************************************************************************************************/
15
16 class KMeans : public CommunityTypeFinder {
17     
18 public:
19     KMeans(vector<vector<int> >, int);
20     vector<double> calcSilhouettes(vector< vector< double> >);
21     double calcCHIndex(vector< vector< double> >);
22     
23 private:
24
25     int findSecondClosest(vector<int>&, vector<vector<double> >&, map<int, int>);
26     double calcScore(int sample, int partition, vector<vector<double> >&, map<int, int>);
27
28 };
29
30 /**************************************************************************************************/
31
32 #endif