knrt.net
当前位置:首页 >> mAtlAB最小生成树算法 >>

mAtlAB最小生成树算法

画最小生成树的两种方法: 一种是避圈法 function A = fun(W) [m, n] = size(W); e = 0;for i = 1 : n for j = i : n if W(i, j) ~= 0 e = e + 1; E(e, :) = [i, j, W(i, j)]; end endend % sort W's edge by weightfor i = 1 : e - 1 for j = i...

网站首页 | 网站地图
All rights reserved Powered by www.knrt.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com