]> git.donarmstrong.com Git - mothur.git/blob - kmeans.cpp
working on get.communitytype command
[mothur.git] / kmeans.cpp
1 //
2 //  kmeans.cpp
3 //  Mothur
4 //
5 //  Created by SarahsWork on 12/4/13.
6 //  Copyright (c) 2013 Schloss Lab. All rights reserved.
7 //
8
9 #include "kmeans.h"
10
11 /**************************************************************************************************/
12
13 KMeans::KMeans(vector<vector<int> > cm, int p) : CommunityTypeFinder() {
14     try {
15         countMatrix = cm;
16         numSamples = (int)countMatrix.size();
17         numOTUs = (int)countMatrix[0].size();
18         numPartitions = p;
19         
20         findkMeans();
21     }
22         catch(exception& e) {
23                 m->errorOut(e, "KMeans", "KMeans");
24                 exit(1);
25         }
26 }
27 /**************************************************************************************************/
28
29
30
31