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

📄 kclusteringdlg.h

📁 K-均值聚类算法 vc++图形演示程序
💻 H
字号:
// KClusteringDlg.h : 头文件
//

#pragma once
#include "BitmapDialog.h"
#include "PicButton.h"
#include "JxEdit.h"
#include "KCluster.h"
#include "afxwin.h"

// CKClusteringDlg 对话框
class CKClusteringDlg : public CBitmapDialog
{
// 构造
public:
	CKClusteringDlg(CWnd* pParent = NULL);	// 标准构造函数

// 对话框数据
	enum { IDD = IDD_KCLUSTERING_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持


// 实现
protected:
	HICON m_hIcon;
	UINT_PTR m_nTimerCluster;
	PicButton m_btnMinimize;
	PicButton m_btnClose;
	PicButton m_btnLeft;
	PicButton m_btnRight;
	PicButton m_btnStartClustering;
	JxEdit m_editClusterNum;
	JxEdit m_editAimValue;
	JxEdit m_editNowState;

	// 缓冲区
	CImage m_DrawBuffer;	

	// 聚类个数
	int m_ClusterNum;
	double m_DataSet[400][2];
	double m_Center[400][2];

	KCluster *m_pKCluster; 

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	virtual void OnOK();

	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
	afx_msg void OnBnClickedButtonMinimize();
	afx_msg void OnBnClickedButtonClose();	
public:
	void DrawClustering(CDC* pDC);
	afx_msg void OnBnClickedButtonLeft();
	afx_msg void OnBnClickedButtonRight();
	afx_msg void OnBnClickedButtonStartClustering();
	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
};

⌨️ 快捷键说明

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