首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > Prim algorithm using minimum spanning tree of the experimental procedures used i...

Prim algorithm using minimum spanning tree of the experimental procedures used i...

  • 资源大小:92.73 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: 数据结构

资 源 简 介

用prim算法实验最小生成树 本程序中用到函数adjg( ),此函数作用是通过接受输入的点数和边数,建立无向图。函数prg( )用于计算并输出无向图的邻接矩阵。函数prim( )则用PRIM算法来寻找无向图的最小生成树 定义了两个数组lowcost[max],closest[max],若顶点k加入U中,则令lowcost[k]=0。 定义二维数组g[ ][ ]来建立无向图的邻接矩阵。 -Prim algorithm using minimum spanning tree of the experimental procedures used in function adjg (), this function is through the acceptance of input points and edges, the establishment of a directed graph. Function of prg () used to calculate and output undirected graph of adjacency matrix. Function prim () is used PRIM Algorithm to find the undirected graph of the minimum spanning tree array defines two lowcost [max], closest [max], if it joined the U of k vertices, then the lowcost [k] = 0. The definition of two-dimensional array g [] [] to create a undirected graph of adjacency matrix.

文 件 列 表

Prim算法
Prim.cpp
Prim.dsp
Prim.exe

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP