登录
首页 » 算法 » 普里姆算法的C语言实现

普里姆算法的C语言实现

于 2022-02-07 发布 文件大小:177.16 kB
0 267
下载积分: 2 下载次数: 1

代码说明:

普里姆(Prim)算法是一种构造性算法。设G=(V,E)是一个具有n个顶点的带权连通无向图,T=(U,TE)是G的最小生成树,其中U是T的顶点集,TE是T的边集,则由G构造从起始顶点v出发的最小生成树T的步骤如下:(1)初始化U={v},以v到其他顶点的所有边为候选边;(2)重复以下步骤(n-1)次,使得其他(n-1)个顶点被加入到U中:  a.从候选边中挑选权值最小的边加入TE,设该边在V-U中的顶点是k,将k加入U中;  b.考察当前V-U中的所有顶点j,修改候选边,若边(k,j)的权值小于原来和顶点j关联的候选边,则用边(k,j)取代后者作为候选边。本代码实现了普里姆算法。代码能正确运行。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 数据挖掘是信息产业界近年来非常热门的研究方向,聚类分析是数据挖掘中的核心技术。本文对数据挖掘领域的聚类分析方及代表进行分析,并从多个方面对这些性能进行...
    数据挖掘是信息产业界近年来非常热门的研究方向,聚类分析是数据挖掘中的核心技术。本文对数据挖掘领域的聚类分析方法及代表算法进行分析,并从多个方面对这些算法性能进行比较,同时还对聚类分析在数据挖掘中的几个应用进行了阐述。-Data Mining is the IT industry is very popular in recent years the direction of the research, cluster analysis is data mining in the core technology. In this paper, the field of data mining methods and the representative of cluster analysis algorithm analysis, and from several aspects of these algorithms to compare the performance, but also on the cluster analysis of data mining in several applications are described.
    2022-03-12 05:41:12下载
    积分:1
  • C语言对文件哈夫曼编码压缩,而不是通过范畴…
    用C语言实现哈夫曼编码对文件进行压缩,并没有通过类来实现,只是用标准的C语言中结构实现的,代码内部说明比较详细,具体可以看代码,包括对文件的编码也解码.-C language of the document Huffman coding compression, and not through the categories to fruition, but the standard C language structure to achieve, and the internal code note in greater detail, the specific code can be seen, including the encoding of the document also decoder.
    2022-05-19 13:57:26下载
    积分:1
  • 吉尔求解一阶微分方程组的
    吉尔法求解一阶微分方程组的算法-Gil Solving equations a band algorithm
    2022-11-29 16:40:03下载
    积分:1
  • em及em初始化matalab程序
    对数据分析的聚类处理包括分层聚类,均值聚类,KNN聚类算法;包含基于em算法的高斯混合估计模型及实现流程。
    2023-05-17 02:25:03下载
    积分:1
  • 基于自适应巴特沃斯滤波器的红外弱小目标检测(Matlab版)
    应用背景由于红外弱小目标具有的可用特征非常有限,尤其在复杂背景下的弱小目标极易淹没在杂乱的信息之中,如何高效准确地从复杂背景中分离出目标具有重要的现实意义。关键技术本工程利用自适应巴特沃斯滤波器对复杂背景下的红外弱小目标进行检测,通过计算信息熵确定滤波器的参数。代码附有详细注释,简明易懂且具有很好的检测效果。
    2022-03-26 18:27:49下载
    积分:1
  • Pequeno 编辑器 de 缔约国
    初 pequeno exemplo contém procedimentos de como trabalhar com 富文本 usando seus recursos 德尼格罗、 sublinhar 等
    2022-12-31 01:30:03下载
    积分:1
  • ! 2 ! HOMPACK90 is a suite of FORTRAN 90 subroutines for solving nonline...
    ! 2 ! HOMPACK90 is a suite of FORTRAN 90 subroutines for solving nonlinear 3 ! systems of equations by homotopy methods. There are subroutines for 4 ! fixed point, zero finding, and general homotopy curve tracking problems, 5 ! utilizing both dense and sparse Jacobian matrices, and implementing 6 ! three different algorithms: ODE-based, normal flow, and augmented 7 ! Jacobian. The (driver) subroutines called by the user are given in the 8 ! table below, and are well documented internally. The user need not 9 ! be concerned with any other subroutines in HOMPACK90. -! 2 ! HOMPACK90 is a suite of FORTRAN 90 subroutines for solving nonlinear 3 ! systems of equations by homotopy methods. There are subroutines for 4 ! fixed point, zero finding, and general homotopy curve tracking problems, 5 ! utilizing both dense and sparse Jacobian matrices, and implementing 6 ! three different algorithms: ODE-based, normal flow, and augmented 7 ! Jac
    2022-07-21 06:18:17下载
    积分:1
  • 在C++程序点四
    四叉树是一种树数据结构,其中每个内部节点正好有四个子节点。四叉树是最重要的
    2022-08-15 15:07:12下载
    积分:1
  • 河内大厦实现步的运动,采用递归
    实现汉诺塔的移动步骤, 使用递归算法。-Tower of Hanoi realize the movement of steps, the use of recursive algorithm.
    2022-07-20 06:45:22下载
    积分:1
  • 3d cylinder vortex meshing
    3d cylinder vortex meshing
    2022-02-12 07:27:22下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载