⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmeandoc.h

📁 用cmean方法做的模式识别聚类程序.通过测量各点之间的距离来确定类别数
💻 H
字号:
// CmeanDoc.h : interface of the CCmeanDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CMEANDOC_H__F927576B_C430_4F62_AF52_1E90E1473515__INCLUDED_)
#define AFX_CMEANDOC_H__F927576B_C430_4F62_AF52_1E90E1473515__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



#include <VECTOR>
using namespace std;

typedef struct Sample {
	CPoint point;
	int    pattern;
	int	   centerflag;//是否是聚类中心的标识
} *pSample;

class CCmeanDoc : public CDocument
{
protected: // create from serialization only
	CCmeanDoc();
	DECLARE_DYNCREATE(CCmeanDoc)

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCmeanDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	int GetCenterListNum();
	int GetDataLength();
	BOOL cmean();
	BOOL mlmsDistance();
	void SetSample(pSample SampleData);
	pSample GetSample(int i);
	virtual ~CCmeanDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CCmeanDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:

	vector<Sample> vData;//存储采集到的数据
	vector<int> vCenterList;//存储聚类中心
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CMEANDOC_H__F927576B_C430_4F62_AF52_1E90E1473515__INCLUDED_)

⌨️ 快捷键说明

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