dijkstraview.h

来自「DijkstraPrj算法的实现」· C头文件 代码 · 共 78 行

H
78
字号
// DijkstraView.h : interface of the CDijkstraView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_DIJKSTRAVIEW_H__280B9519_B75D_4672_A72E_2385F050ACE3__INCLUDED_)
#define AFX_DIJKSTRAVIEW_H__280B9519_B75D_4672_A72E_2385F050ACE3__INCLUDED_

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



#define MAX_VALUE 90000
#define SUM_NODE 10	 // 节点数目
#define SUM_EDGE 15  // 边数
typedef struct Edge{
		int id;
		int headNodeId,endNodId;
		int wight;		
	}EDGE;

class CDijkstraView : public CView
{
protected: // create from serialization only
	CDijkstraView();
	DECLARE_DYNCREATE(CDijkstraView)

// Attributes
public:
	CDijkstraDoc* GetDocument();
	Dijkstral(Edge *pEdges, int nEdges, int S, int T,int *pPath);

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDijkstraView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDijkstraView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CDijkstraView)
	afx_msg void OnDijkstral();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in DijkstraView.cpp
inline CDijkstraDoc* CDijkstraView::GetDocument()
   { return (CDijkstraDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_DIJKSTRAVIEW_H__280B9519_B75D_4672_A72E_2385F050ACE3__INCLUDED_)

⌨️ 快捷键说明

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