图论中最小生成树Kruskal算法 及画图程序 M
图论中最小生成树Kruskal算法 及画图程序 M-函数
格式 [Wt,Pp]=mintreek(n,W):n为图顶点数,W为图的带权邻接矩阵,不构成边的两顶点之间的权用inf表示。显示最小生成树的边及顶点, Wt为最小生成树的权,Pp(:,1:2)为最小生成树边的两顶点,Pp(:,3)为最小生成树的边权,Pp(:,4)为最小生成树边的序号 附图,红色连线为最小生成树的图
例如
n=6 w=inf*ones(6)
w(1,[2,3,4])=[6,1,5] w(2,[3,5])=[5,3]
w(3,[4,5,6])=[5,6,4] w(4,6)=2 w(5,6)=6
[a,b]=mintreek(n,w)
-Graph theory Kruskal minimum spanning tree algorithm and Paint program M-function format [Wt, Pp] = mintreek (n, W): n for the map Vertices, W for weighted graph adjacency matrix, does not constitute the edge of the two vertices of between the right to express with inf. Show the minimum spanning tree of edges and vertices, Wt right for the Minimum Spanning Tree, Pp (:, 1:2) for the minimum spanning tree edges of the two vertices, Pp (:, 3) for the minimum spanning tree of the right side, Pp ( :, 4) For the minimum spanning tree graph edge serial number, red connection for the minimum spanning tree of graph such as n = 6 w = inf* ones (6) w (1, [2,3,4]) = [ 6,1,5]
- 2022-01-30 21:32:39下载
- 积分:1
C语言高级编程及实例剖析/王为青, 刘变红编著
ISBN号: 978
C语言高级编程及实例剖析/王为青, 刘变红编著
ISBN号: 978-7-115-15423-1
出版发行项: 北京-人民邮电出版社 2007
光盘内容
附注项: 本书结合实例,深入浅出地介绍了C语言在主要应用领域的编程技术。全书共9章,分别为内存管理、文本屏幕界面设计、文件高级操作、图形图象、中断、通信技术、基本总线接口编程等。
附注项: C语言程序设计人员。
-C high-level programming language and examples of analysis/Wang Qing, Liu red for the ISBN number: 978-7-115-15423-1 published items: Beijing- People" s Posts & Telecom Press, 2007 CD-ROM of the contents of note: the book with examples, to learn more on the C language applications in the main programming. 9 book chapters, respectively, memory management, text-screen interface design, documentation of the advanced operators, graphic images, interruption, communications technology, such as the basic bus interface programming. Note item: C language programmers.
- 2022-01-26 01:24:09下载
- 积分:1