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

📄 graph.h

📁 是数据结构实习很好的参考范本
💻 H
字号:
// Graph.h: interface for the CGraph class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GRAPH_H__2FB82D5B_6C4D_42D6_B451_A85B70E67D64__INCLUDED_)
#define AFX_GRAPH_H__2FB82D5B_6C4D_42D6_B451_A85B70E67D64__INCLUDED_

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

class CGraph  
{
public:
	void CZHao(int i,CDC*pDC);
	void clear();
	int input(CDC *pDC);
	void xianshi(int i,int j,CDC *pDC );
	void floyed();
	int m_pd;
	void Createluj(CDC *pDC);
	COLORREF m_nclr;
	CGraph();
	virtual ~CGraph();
	void draw(CDC *pDC);
		public:
	CPoint loc[100];//存放顶点坐标Node
	int cost[100][100];//邻接矩阵Quanz[][]
	int dist[100];// 对于不属于S的顶点 ,从始点出发经过S中顶点到达终点的最短路径长度
	int path[100];//到终点的最短路径经过的最后一个顶点
	BOOL s[100];//最短路径已找到的重点 的集合

public:
	void Tianjia(int x,int y,CDC*pDC);

//	void Input(CDC *pDC);
	void drawpath(int m_start,int m_end,CDC *pDC);
	int choose(const int n);
	void ShortestPath(int n,int v);
    
};

#endif // !defined(AFX_GRAPH_H__2FB82D5B_6C4D_42D6_B451_A85B70E67D64__INCLUDED_)

⌨️ 快捷键说明

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