91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-13
  • 語言: Matlab
  • 標簽: matlab??最短路徑??

資源簡介

計算最短路徑的matlab代碼,適用于稀疏矩陣

資源截圖

代碼片段和文件信息

function?[d?pred]?=?dijkstra_sp(Auvarargin)
%?DIJKSTRA_SP?Compute?the?weighted?single?source?shortest?path?problem.
%
%?Dijkstra‘s?algorithm?for?the?single?source?shortest?path?problem?only
%?works?on?graphs?without?negative?edge?weights.
%
%?This?method?works?on?weighted?directed?graphs?without?negative?edge
%?weights.
%?The?runtime?is?O(V?log?(V)).
%
%?See?the?shortest_paths?function?for?calling?information.??This?function?
%?just?calls?shortest_paths(...struct(‘algname‘‘dijkstra‘));
%
%?The?options?structure?can?contain?a?visitor?for?the?Dijkstra?algorithm.??
%
%?See?http://www.boost.org/libs/graph/doc/DijkstraVisitor.html?for?a?
%?description?of?the?events.
%?
%?visitor?is?a?struct?with?the?following?optional?fields
%????vis.initialize_vertex(u)
%????vis.discover_vertex(u)
%????vis.

評論

共有 條評論