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

📄 graph.h

📁 应用斐波纳契堆和邻接表改进单源最短路径算法
💻 H
字号:
//////////////////////////////////////////////////////////////////////////////////////
#include<iostream.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<time.h>
#include<iomanip.h>
#include"List.h"
#include"Fibhead.h"
//////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
class Graph{
private:
	List<Node> *HeadNodes;
	int dist[nmax];
	Boolean s[nmax];
	int n;
public:
	int path[nmax];
	Graph(const int vertices=7):n(vertices){
	HeadNodes=new List<Node>[n];
	};
	void Insert(const int u,const int v,const int length);
	void ShortestPath(const int n,const int v);
    ~Graph(){delete []HeadNodes;};
};
/////////////////////////////////////////////////////////////////////////////////////


⌨️ 快捷键说明

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