#include<stdio.h>
#include<stdlib.h>
#define M 20
#define MAX 20
//结构体定义
typedef struct
{
int begin;
int end;
int weight;
}edge;
typedef struct
{
int adj;
int weight;
}AdjMatrix[MAX][MAX];
typedef struct
{
AdjMatrix arc;
int vexnum,arcnum;
}MGraph;
//函数申明
void CreatGraph(MGraph*);
void sort(edge*,MGraph*);
void MiniSpanTree(MGraph*);
int Find(int*,int);
void Swapn(edge*,int,int);
void CreatGraph(MGraph*G)//构造图
{
int i,j,n,m;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载