inputcu.cpp

来自「蚁群算法,用VC++编写的,这是一种简单高效的智能优化算法」· C++ 代码 · 共 81 行

CPP
81
字号
// InputCu.cpp : implementation file
//

#include "stdafx.h"
#include "antclusting.h"
#include "InputCu.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CInputCu dialog


CInputCu::CInputCu(CWnd* pParent /*=NULL*/)
	: CDialog(CInputCu::IDD, pParent)
{
	//{{AFX_DATA_INIT(CInputCu)
	m_CuNumber = 0;
	m_algorithm = 0;
	//}}AFX_DATA_INIT
}


void CInputCu::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CInputCu)
	DDX_Control(pDX, IDC_TAG, m_inputtag);
	DDX_Text(pDX, IDC_INPUTCU, m_CuNumber);
	DDX_Radio(pDX, IDC_KMEANS1, m_algorithm);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CInputCu, CDialog)
	//{{AFX_MSG_MAP(CInputCu)
	ON_BN_CLICKED(IDC_KMEANS1, OnKmeans1)
	ON_BN_CLICKED(IDC_KMEANS2, OnKmeans2)
	ON_BN_CLICKED(IDC_KMEDOID, OnKmedoid)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInputCu message handlers

void CInputCu::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData();
	CDialog::OnOK();
}

void CInputCu::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

void CInputCu::OnKmeans1() 
{
	// TODO: Add your control notification handler code here
		m_algorithm=0;
}

void CInputCu::OnKmeans2() 
{
	// TODO: Add your control notification handler code here
		m_algorithm=1;
}

void CInputCu::OnKmedoid() 
{
	// TODO: Add your control notification handler code here
		m_algorithm=2;
}

⌨️ 快捷键说明

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