带权邻接矩阵 Resources

Showing items tagged with "带权邻接矩阵"

Implementation of Kruskal's algorithm for Minimum Spanning Tree in graph theory with visualization program. M-function format [Wt, Pp] = mintreek(n, W) where n represents number of graph vertices, W is weighted adjacency matrix (non-connected vertices use 'inf'). Displays MST edges/vertices: Wt stores total weight, Pp(:,1:2) contains edge vertices, Pp(:,3) edge weights, Pp(:,4) edge indices. Red lines in plot indicate MST connections.

MATLAB 227 views Tagged