island.h
来自「实现岛上建立公路的最短路径算法」· C头文件 代码 · 共 46 行
H
46 行
/***********************************************
***头部文件定义
**********************************************/
#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 + =
减小字号Ctrl + -
显示快捷键?