?? pr_cluster.h
字號:
#ifndef PR_CLUSTER_H
#define PR_CLUSTER_H
#include"PR_unit.h"
using std::vector;
class PR_Cluster //The cluster class
{
public:
vector< PR_unit* > samples;
vector< int > serial;
PR_unit* center;
PR_unit* delta; //the standard deviation distance vector
double D; //the average distance
double deltamax;
double num_max;
PR_Cluster(){}
PR_Cluster(int i):D(0)
{
center = new PR_unit(i,0);
delta = new PR_unit(i,0);
}
// PR_Cluster(PR_unit unit);
void CalcCenter(); //calculate the center of cluster
void CalcAverDis();
void CalcSDVector();// calculate the standard deviation distance vector
void CalcMaxComponent(); // calculate the max component in the standard deviation distance vector
void Print()
{
for(int i=0;i<serial.size();i++)
{
cout<<serial[i]+1<<" ";
}
}
void PrintCenter()
{
for(int i=0;i<center->unit.size();i++)
{
cout<<center->unit[i]<<" ";
}
}
void PrintDelta()
{
for(int i=0;i<delta->unit.size();i++)
{
cout<<delta->unit[i]<<" ";
}
}
void PrintDeltaMax()
{
cout<< deltamax << " ";
}
void PrintD()
{
cout<< D << " ";
}
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -