?? pr_isodata.h
字號:
#ifndef PR_ISODATA_H
#define PR_ISODATA_H
#include"PR_unit.h"
#include<fstream>
#include<string>
#include"PR_Cluster.h"
class DClusters
{
public:
double d;
int i;
int j;
};
bool DijGreater( DClusters *d1,DClusters *d2);
class PR_ISODATA
{
public:
vector< PR_unit* > samples;
PR_ISODATA(){}
PR_ISODATA(int m,int n);
PR_ISODATA(std::ifstream &fin);
//inner parameters;
int K; //the expect number of cluster
double SitaN; //the least number samples in a cluster
double SitaS; //the Standard Deviation in a cluster
double Sitac; //the smallest distance of two clusters
int L; //the most number of clusters we can union at one time
int I; //the most iterative number
//
int Nc;
void PrintSamples();
void SetPrameters();
void PrintParameters();
void PrintDelta();
void PrintDeltaMax();
void PrintD();
void PrintDij();
void Rend(); //start the algorithm
void PrintClusters(); //print the result
void PrintClusterCenter(); //print the center of the clusters
private:
vector<PR_Cluster*> clusters;
//int iter_number; //the iterative number
double D; //the whole average distance
double k;
int num_samples;
int num_vector;
bool flag_split;
vector<DClusters*> Dij;
void AddSampleToCluster(int i,PR_Cluster* t_cluster);//add the i number sample to the cluster
void DeleteCluster(int i);
void AddCluster(PR_Cluster* t_cluster);
void NearnestCluster(); //sort the samples to the nearest cluster
void CancelaCluster(); //if the number of samples in a cluster is samller than SitaC ,then cancel the cluster
void UpdateClusterCenter(); //update the center of clusters
void CalcAverDis(); //calculate the average distance in each cluster
void CalcWholeAverDis();
void CalcSDVector(); //calculate the standard deviation distance vector in each cluster
void CalcMaxComponent();
void CalcWholeClusterDis(); //calculate the distance between clusters
void SortDij();
void SplitaCluster();
void Unite2cluster();
void Split();
void Unite();
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -