Click here to Skip to main content
15,897,226 members
Articles / Programming Languages / C++

Dijkstra Algorithm

Rate me:
Please Sign up or sign in to vote.
4.43/5 (40 votes)
23 Dec 20033 min read 369.2K   22.3K   102  
Shortest path (Dijkstra's Algorithm)
#if !defined(AFX_DIJKSTRA_H__7416410A_BF1D_4FFA_9464_E93538E67B50__INCLUDED_)
#define AFX_DIJKSTRA_H__7416410A_BF1D_4FFA_9464_E93538E67B50__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file.  If this class is regenerated by
//  Microsoft Visual C++, your modifications will be overwritten.

/////////////////////////////////////////////////////////////////////////////
// CDijkstra wrapper class

class CDijkstra : public CWnd
{
protected:
	DECLARE_DYNCREATE(CDijkstra)
public:
	CLSID const& GetClsid()
	{
		static CLSID const clsid
			= { 0x6f02af52, 0xec0b, 0x4188, { 0xa4, 0x52, 0x3f, 0x1e, 0x39, 0xf1, 0xb3, 0x47 } };
		return clsid;
	}
	virtual BOOL Create(LPCTSTR lpszClassName,
		LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect,
		CWnd* pParentWnd, UINT nID,
		CCreateContext* pContext = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); }

    BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect, CWnd* pParentWnd, UINT nID,
		CFile* pPersist = NULL, BOOL bStorage = FALSE,
		BSTR bstrLicKey = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
		pPersist, bStorage, bstrLicKey); }

// Attributes
public:

// Operations
public:
	void Initialize(long nrvert, short bidir);
	void StartAddNodes();
	void StartAddEdges();
	void ShortestPath(long node1, long node2);
};

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

#endif // !defined(AFX_DIJKSTRA_H__7416410A_BF1D_4FFA_9464_E93538E67B50__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Romania Romania
Education Computer Engineering Faculty 1994-1999
University of Iasi ? Romania
Engineering degree: system and computers
Specialty: programmer analyst
License: (Computer Engineering Faculty) 2000
Master: (Distributed Computing) 2001 - 2002
Final Project: Remote Access. Encrypted file transfer.
Accessing any computer?s desktop through Internet or LAN.
Technologies: COM, ATL, API, SDK, MFC

Comments and Discussions