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

📄 prim040819dlg.h

📁 这是一个用于计算最小生成树的程序。当人们逐个输入每条边的权
💻 H
字号:
// PRIM040819Dlg.h : header file
//

#if !defined(AFX_PRIM040819DLG_H__BC496C15_0D84_4916_B3A2_BB5AFDC5A590__INCLUDED_)
#define AFX_PRIM040819DLG_H__BC496C15_0D84_4916_B3A2_BB5AFDC5A590__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxtempl.h>
#include <Math.h>

#define INF (65535)
#define PI (3.141592653589793238462643350288)

#define MAX_VERTEX_NUM  11

typedef struct {
        int  vexs[MAX_VERTEX_NUM];
        int  vexnum;
        int  matrix[MAX_VERTEX_NUM][MAX_VERTEX_NUM];
        int  arcnum;
        }Graph;

typedef struct {
		int	adjvex;
		int	lowcost;
		}CloseEdge;

/////////////////////////////////////////////////////////////////////////////
// CPRIM040819Dlg dialog

class CPRIM040819Dlg : public CDialog
{
// Construction
public:
	void DrawTree(int start,int end);
	int StartVex();
	void MinSpanTree();
	void AddEdge(int start,int end,int length);
	void DrawEdge(int begin,int end);
	void DrawGraph();
	void DrawFrame();
	void Init();
	CloseEdge MyCloseEdge[MAX_VERTEX_NUM];
	Graph MyGraph;
	CPRIM040819Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CPRIM040819Dlg)
	enum { IDD = IDD_PRIM040819_DIALOG };
	int		m_BEGIN;
	int		m_END;
	int		m_COST;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CPRIM040819Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton1();
	afx_msg void OnButton2();
	afx_msg void OnButton3();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_PRIM040819DLG_H__BC496C15_0D84_4916_B3A2_BB5AFDC5A590__INCLUDED_)

⌨️ 快捷键说明

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