⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.m

📁 Algorithme de Djikstra
💻 M
字号:
% test for the dijkstra algorithm%%   Copyright (c) 2004 Gabriel Peyrclc;clear all;[M, cm] = imread('test.png');colormap(cm);M = double(M);[A,vertex] = build_graph_from_image( M, 8 );n = size(vertex,1);gplot( A,vertex, 'k.-' );axis tight;axis off;W = build_euclidean_weight_matrix(A,vertex,Inf);start_verts = 1;  % start vertexoptions.stop_at = [15+15*sqrt(n)];options.stop_when = 100000;% set up callback function for A*heuristic.func  = 'heuristic_callback';heuristic.weight  = 0;heuristic.target = options.stop_at;heuristic.vertex = vertex;%data = dijkstra(W, start_verts, options, heuristic);data = dijkstra(W, start_verts, options);%data = dijkstra(W, start_verts);dijkstra_plot(data, vertex, options.stop_at);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -