subclust.h

来自「减聚类的类代码」· C头文件 代码 · 共 62 行

H
62
字号
// subclust.h
// Author:	
// Date:
// Reference:

#if !defined(AFX_SUBCLUST1_H__C40E0E86_7A7B_42AE_97B6_02F2F96E7A7C__INCLUDED_)
#define AFX_SUBCLUST1_H__C40E0E86_7A7B_42AE_97B6_02F2F96E7A7C__INCLUDED_

#include "real_mat.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define MAXWORD 0xffff

class CSubclust  
{
public:
	void CreateLabel();
	void Subclust();
	void SetAvgCenter(double* pAvgCenter);
	bool ComputeAvgCenter();
//	int* GetPointLabel();
//	int* GetClusterCenterLabel();
//	double* GetClusters();
	int GetClustersNum();
	void SetData(double *pX,int* pLabel,int nPoints,int nDimension,double radii);
	Double_Matrix GetClustersMatrix();
	CSubclust();
	virtual ~CSubclust();
private:
	double sqshFactor;
	double acceptRatio;
	double rejectRatio;
	double verbose;

	double* m_pAvgCenter;
	int* m_pLabel;
	
	int m_nPoints;
	int m_nDimension;

	double accumMultp[2];
	double sqshMultp[2];
	//输出参数
	Double_Matrix m_mClusters;
	Double_Matrix m_mSigma;
	long m_nClusters;
	int* m_pClusterCenterLabel;
	double* m_pCent;
	//输入参数
	double* m_pX;
	double m_radii;
protected:
	void ComputeInitPotVal(double* pPotVals);
	void Normalize(double* pX, double* pMin, double* pMax);
	int FindMax(double* pX,double&);

};

#endif // !defined(AFX_SUBCLUST1_H__C40E0E86_7A7B_42AE_97B6_02F2F96E7A7C__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?