mincostpath_m.m

来自「beamlet变化的工具箱」· M 代码 · 共 37 行

M
37
字号
%  MinCostPath -- Find the Minimum Cost Path%   Usage%     [Path,MinCost] = MinCostPath(v0,v1,VE,n);%   Inputs%     v0,v1      starting, ending vertices, %                2-d array takes integral values between 0 and n.%     VE         value of beam in the beamlet graph,%                same data structure as beamlet coefficients%     n          n by n image%   Outputs%     Path       path of minimum cost in the beamlet graph%     MinCost    value of the minimum cost%   Description%    [1] Implement Dijkstra's algorithm. The key idea is to keep an OPEN%        set. In every time, it takes the element (an vertex) of OPEN %        that is corresponding to the MINIMUM value, find all children of %        this vertex, then detect if d_i+a_{ij}<min{d_j,UPPER}, where UPPER%        is prespecified. % %        This is too brief, for a detailed description, see Bertsekas' "Dynamic%        Programming and Optimal Control", page 66% %%% Part of BeamLab Version:200% Built:Friday,23-Aug-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%%% Part of BeamLab Version:200% Built:Saturday,14-Sep-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%

⌨️ 快捷键说明

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