Advertisement

数据结构与算法 7.9 普里姆算法-无向网的最小生成树

阅读量:
复制代码
    #include<stdio.h>
    #include<string.h>
    #include<stdlib.h>
    
    #define TRUE 1
    #define FALSE 0
    #define OK 1
    #define ERROR 0
    #define INFEASIBLE -1
    #define OVERFLOW -2
    
    typedef int Status;
    typedef int ElemType;
    
    #define  INFINITY 65535   //最大值∞
    #define MAX_VERTEX_NUM 20  //最大顶点个数
    
    typedef int Status;
    typedef int VRType;
    typedef char InfoType;
    typedef int VertexType;
    typedef enum {DG,DN,UDG,UDN}GraphKind;   //{有向图,有向网,无向图,无向网}
    
    typedef struct ArcCell
    {
    VRType adj;  //VRType 是顶点关系类型。对无权图,用0或1表示相邻否;

全部评论 (0)

还没有任何评论哟~