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

📄 island.h

📁 实现岛上建立公路的最短路径算法
💻 H
字号:
/***********************************************
***头部文件定义
**********************************************/
#ifndef ISLAND_H
#define ISLAND_H

#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include<string.h>


#define MAX  101		//表示无通路

#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:4996)

struct MGraph			//图的结构体定义
{
	int *vexs;			//列向量
	int **arcs;			//邻接矩阵
	int vexnum;			//节点数目
};

struct Close			//辅助数组的结构体定义
{
	int adjvex;			//结点
	int lowcost;		//最小权值
};

/***********************************************************
//*****图的初始化
************************************************************/
void GraphInit(struct MGraph &G,int v);

/***********************************************************
//*****Prim算法求最小生成树,返回权值总和
************************************************************/
int Mini_SpanTree_PRIM(struct MGraph G,int v);

/***********************************************************
//*****Prim算法中求每个结点周围的最小权值结点
************************************************************/
int minimum(struct Close closedge[],int v);

#endif

⌨️ 快捷键说明

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