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

📄 convndlg.h

📁 数据结构的课程设计 图的最小生成树
💻 H
字号:
// ConvNDlg.h : header file
//

#if !defined(AFX_CONVNDLG_H__EB35E798_2DBB_4177_ADED_D1A1C0CE8D79__INCLUDED_)
#define AFX_CONVNDLG_H__EB35E798_2DBB_4177_ADED_D1A1C0CE8D79__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
const INFINITY=10000;
const MAX_VERTEX_NUM=10;


typedef struct 
{
	char vexs[MAX_VERTEX_NUM];
	int arcs[MAX_VERTEX_NUM][MAX_VERTEX_NUM];
	int vexnum,arcnum;
}MGraph;
typedef struct
{
	char adjvex;
	int lowcost;
}Closedg;
//Closedg closedge[MAX_VERTEX_NUM]; 
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

/////////////////////////////////////////////////////////////////////////////
// CConvNDlg dialog

class CConvNDlg : public CDialog
{

// Construction
public:
	CConvNDlg(CWnd* pParent = NULL);	// standard constructor
	
	Closedg closedge[MAX_VERTEX_NUM];
// Dialog Data
	//{{AFX_DATA(CConvNDlg)
	enum { IDD = IDD_CONVN_DIALOG };
	CButton	m_about;
	CListBox	m_minitree;
	CListBox	m_listout;
	int		m_arcnum;
	int		m_vexnum;
	CString	m_vexs;
	CString	m_1a;
	CString	m_1b;
	int		m_1c;
	CString	    m_out2;
	CString	    m_ouths;
	MGraph G;
	int counta;
	int countb;
	CString	m_root;
	CString	m_srsm;
	CString	m_smst;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CConvNDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
	
// Implementation
protected:
	//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
	int LocateVex(/*MGraph G,*/CString v);
	//void Create(MGraph &G);
	void MiniSpanTree_PRIM(MGraph &G,char u);
	int minimum();
	void Display();
	BOOL m_bExpand;
	UINT m_nExpandedWidth,m_nNormalWidth;
	
	//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CConvNDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton3();//MGraph &G
	afx_msg void OnButton5();
	afx_msg void OnButton1();
	afx_msg void OnBUTTONclear();
	afx_msg void OnHelp();
	afx_msg void OnBUTTONhelp();
	afx_msg void OnBUTTONabout();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_CONVNDLG_H__EB35E798_2DBB_4177_ADED_D1A1C0CE8D79__INCLUDED_)

⌨️ 快捷键说明

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