-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcluster.h
34 lines (26 loc) · 844 Bytes
/
cluster.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
# include<vector>
using namespace System::Drawing;
class P { public: std::vector<double> x; std::string pathToFile;};
class vids { public: float distance; unsigned int gg; };//dlja vidstanej
class cluster
{
public:
cluster();
std::vector<P> koord; //vsi tochky | N-rozmir
std::vector<P> centry; //pochatkovi dlja kmeans
unsigned int k, n, np, ksusidy, ki; //kilkist klasteriv, Rprostoru, nTochok
std::vector<P> previouscentry;
std::vector< std::vector<P> > kser;//mnozhyna klasteriv "kmeans" | kser[k]
unsigned int end;
P pointkNN; //new point
std::vector<vids> vidstani;
Bitmap^ toGrayScale(Bitmap^);
P vectorization(Bitmap^);
void choosecenters();//vybir pochatkovyh centriv
void bindpoints(); //rozkyd po klasteram kmeans
double dosqrt(P, P);
void centermass();
void kNearest(); //kNN
~cluster();
};