- 11
- 0
- 约8.21千字
- 约 13页
- 2017-08-24 发布于河南
- 举报
#ifndef ADJMATRIX_H
#define ADJMATRIX_H
#includevector
#includestring
using namespace std;
const int MaxValue=200;//城市路程最大值
struct EdgeType
{
int iDistance;//路程
};
struct City{
int Number;
char *Name;
};//城市结构体,包括城市名字以及城市在图结构中的编号
class AdjMatrix{
public:
AdjMatrix(int n);//构造函数
int GetVexNum();//取得交通图的城市个数
int GetEdgNum();//取得交通图的路线数目
int GetCityNum(char* cityname);//通过城市名字取得城市的编号
char* GetCityName(const int i);//通过序号取得城市的名字
void CreateGraph();//构造交通图
void ShowRouteLength();//向用户显示路程长度
void Dijkstra(int v,int dist[],int path[]);//在图结构中求一个点到其他点的最短长度
void DijkstraShort
原创力文档

文档评论(0)