资源简介
解决复杂网络度、度分布、介数、网络效率等以及不同攻击模式下的网络参数计算与图表
代码片段和文件信息
function [DP] = all_shortest_paths(Avarargin)
% all_shortest_paths Compute the weighted all pairs shortest path problem.
%
% D = all_shortest_paths(A) returns the distance matrix D for all vertices
% where D(ij) indicates the shortest path distance between vertex i and
% vertex j.
%
% For the Floyd-Warshall algorithm this function can return the
% predecessor matrix as well:
% [D P]=all_shortest_paths(Astruct(‘algname‘‘floyd_warshall‘));
% returns P so that the P(ij) is the node preceeding j on the path from
% i to j. To build the path between (ij) use the commands
% p=[]; while j~=0 p(end+1)=j; j=P(ij); end; p=fliplr(p);
%
% ... = all_shortest_paths(Au...) takes a set of
% key-value pairs or an options structure. See set_matlab_bgl_options
% for the standard options.
% options.algname: the algorithm to use
% [{‘auto‘} | ‘johnson‘ | ‘floyd_warshall‘]
% options.inf: the value to use for unreachable vertices
% [double > 0 | {Inf}]
% options.edge_weight: a double array over the edges with an edge
% weight for each node see EDGE_INDEX and EXAMPLES/REWEIGHTED_GRAPHS
% for information on how to use this option correctly
% [{‘matrix‘} | length(nnz(A)) double vector]
%
% Note: ‘auto‘ cannot be used with ‘nocheck‘ = 1. The ‘auto‘ algorithms
% checks the number of edges in A and if the graph is more than 10% dense
% it uses the Floyd-Warshall algorithm instead of Johnson‘s algorithm.
%
% Example:
% load graphs/clr-26-1.mat
% all_shortest_paths(A)
% all_shortest_paths(Astruct(‘algname‘‘johnson‘))
%
% See also JOHNSON_ALL_SP FLOYD_WARSHALL_ALL_SP.
% David Gleich
% Copyright Stanford University 2006-2008
%% History
% 2006-04-19: Initial version
% 2006-05-31: Added full2sparse check
% 2007-03-01: Added option for predecessor matrix from floyd_warshall
% 2007-04-20: Added edge weight option
% 2007-07-08: Fixed typos in strings and documentation
% Removed fixes for the Johnson algorithm
% 2007-07-12: Fixed edge_weight documentation.
% 2007-07-21: Fixed divide by 0 error in check for algorithm type
% 2008-04-02: Added documenation for predecessor matrix
% 2008-10-07: Changed options parsing
%%
[trans check full2sparse] = get_matlab_bgl_options(varargin{:});
if full2sparse && ~issparse(A) A = sparse(A); end
options = struct(‘algname‘ ‘auto‘ ‘inf‘ Inf ‘edge_weight‘ ‘matrix‘);
options = merge_options(optionsvarargin{:});
% edge_weights is an indicator that is 1 if we are using edge_weights
% passed on the command line or 0 if we are using the matrix.
%edge_weights = 0;
edge_weight_opt = ‘matrix‘;
if strcmp(options.edge_weight ‘matrix‘)
% do nothing if we are using the matrix weights
else
edge_weight_opt = options.edge_weight;
end
if check
% check the values of the matrix
check_matlab_bgl(Astruct(‘values‘1));
% set the algname
if strcmpi(options.algname ‘auto‘)
nz = nnz(A);
if (nz/(numel(A)+1) > .1)
opti
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 208 2008-10-22 09:37 matlab_bgl\.project
文件 245 2008-10-22 09:37 matlab_bgl\@inplace\assign.m
文件 195 2008-10-22 09:37 matlab_bgl\@inplace\display.m
文件 319 2008-10-22 09:37 matlab_bgl\@inplace\double.m
文件 239 2008-10-22 09:37 matlab_bgl\@inplace\end.m
文件 766 2008-10-22 09:37 matlab_bgl\@inplace\inplace.m
文件 228 2008-10-22 09:37 matlab_bgl\@inplace\size.m
文件 269 2008-10-22 09:37 matlab_bgl\@inplace\subsasgn.m
文件 687 2008-10-22 09:37 matlab_bgl\@inplace\subsref.m
文件 276 2008-10-22 09:37 matlab_bgl\@ipdouble\ipdouble.m
文件 269 2008-10-22 09:37 matlab_bgl\@ipint32\ipint32.m
文件 3546 2008-10-22 09:37 matlab_bgl\all_shortest_paths.m
文件 3582 2008-10-22 09:37 matlab_bgl\astar_search.m
文件 1606 2008-10-22 09:37 matlab_bgl\bellman_ford_sp.m
文件 3527 2011-11-03 11:09 matlab_bgl\betweenness_centrality.m
文件 1757 2008-10-22 09:37 matlab_bgl\bfs.m
文件 2198 2008-10-22 09:37 matlab_bgl\biconnected_components.m
文件 1850 2008-10-22 09:37 matlab_bgl\boyer_myrvold_planarity_test.m
文件 2525 2008-10-22 09:37 matlab_bgl\breadth_first_search.m
文件 1728 2008-10-22 09:37 matlab_bgl\chrobak_payne_straight_line_drawing.m
文件 774 2008-10-22 09:37 matlab_bgl\circle_graph_layout.m
文件 1347 2008-10-22 09:37 matlab_bgl\clique_graph.m
文件 3653 2008-10-22 09:37 matlab_bgl\clustering_coefficients.m
文件 3048 2008-10-22 09:37 matlab_bgl\combine_visitors.m
文件 1416 2008-10-22 09:37 matlab_bgl\components.m
文件 4560 2008-10-22 09:37 matlab_bgl\Contents.m
文件 3252 2008-10-22 09:37 matlab_bgl\core_numbers.m
文件 1509 2008-10-22 09:37 matlab_bgl\custom\dijkstra_all_sp.m
文件 2057 2008-10-22 09:37 matlab_bgl\custom\path_histogram.m
文件 1226 2008-10-22 09:37 matlab_bgl\cycle_graph.m
............此处省略271个文件信息
相关资源
- matlab 复杂网络工具箱
- stanford研究组开发的图论工具箱matla
- matlab-BGL工具箱及使用说明
- matlab-bgl 4.0.1
- matlab bgl工具箱
- 一个社团发现的MATLAB工具箱
- 复杂网络的matlab源程序好不容易找到
- ComplexNetworksPackage matlab复杂网络分析
- 复杂网络MATLAB工具包和源程序(好不
- 复杂网络度分布计算的Matlab程序
- matlab复杂网络程序将txt文件中的数据
- matlab模拟复杂网络攻击源代码.zip
- 3个常见复杂网络的matlab程序
- 7种复杂网络MATLAB经典算法
- MATLAB复杂网络工具箱使用手册
- matlab复杂网络及其零模型性质计算
- 复杂网络中GN,FN网络的matlab实现
- 复杂网络最短路径matlab
- matlab复杂网络 gn算法
- 复杂网络幂律分布matlab仿真程序
- 复杂网络中无向无权图的最短路径m
- 复杂网络的小世界模型的matlab实现
- 复杂网络可视图建网 度分布
- 复杂网络中常用的ER网络、BA网络、
- 复杂网络节点度和度分布计算的MATL
- 复杂网络邻接矩阵转pajek网络文件ma
- BGLL算法matlab实现 社区挖掘
- 复杂网络matlab经典算法
- 复杂网络度分布图的matlab编程代码
- 复杂网络聚类系数的matlab编程代码
评论
共有 条评论