tspdlg.h

来自「用vc++实现的蚁群算法解决50个以内的城市的tsp问题。」· C头文件 代码 · 共 65 行

H
65
字号
// tspDlg.h : header file
//

#if !defined(AFX_TSPDLG_H__A5B33E90_8100_49EA_A21A_376E2FEB0C1D__INCLUDED_)
#define AFX_TSPDLG_H__A5B33E90_8100_49EA_A21A_376E2FEB0C1D__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CTspDlg dialog

class CTspDlg : public CDialog
{
// Construction
public:
	int openflag;
	void chushihua();
	int citynum;
	CTspDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTspDlg)
	enum { IDD = IDD_TSP_DIALOG };
	int		m_nc;
	int		m_antnum;
	double	m_rou;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTspDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CTspDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	virtual void OnOK();
	afx_msg void OnOk2();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	double random01();
	double d[50][50];
	void astsp();
	void draw();
	int bianhao[50];
//	int citynum;
	CPoint point[50];
};

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

#endif // !defined(AFX_TSPDLG_H__A5B33E90_8100_49EA_A21A_376E2FEB0C1D__INCLUDED_)

⌨️ 快捷键说明

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