rope.h

来自「最短路径的具体实现」· C头文件 代码 · 共 37 行

H
37
字号
/***********************************************
***头部文件定义
**********************************************/
#ifndef ROPE_H
#define ROPE_H

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

#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:4996)

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

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

/***********************************************
**求最短路径,即被拉紧绳子的长度
***********************************************/
int ShortestPath_FLOYD(MGraph	G,int  **dist,int P[1000][2],int m);

/***********************************************
**求矩阵中的最大值
***********************************************/
int MatrixMax(int **p,int n);

#endif

⌨️ 快捷键说明

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