mexbetweenescentrality.m

来自「复杂网络的一些节点面对攻击的代码」· M 代码 · 共 36 行

M
36
字号
function [Betweenness, NodeIDs]= mexBetweenesCentrality(Graph, Direction, ShowProgress)
% Efficiently computes betweenness centrality of all nodes of graph.
%
% Receives:
%   Graph       -   struct      -   Graph, created with GraphLoad
%   Direction   -   string      -   (optional) The way the passes are followed: 'direct','inverse' or 'both'. Default: 'direct' 
%   ShowProgress-   boolean     -   (optional) Since the execution time may be very long, this option will cause the mex-file
%                                   to produce output in the MatLab prompt that update the user on the computation progress 
%                                   and execution time forecast.
%
% Returns:
%   Betweenness -   array of double     -   Computed betweenness of each node
%   NodeIDs     -   array of integers   -   (optional) List of node IDs. 
%
% Algorithm:
%   http://www.inf.uni-konstanz.de/algo/publications/b-fabc-01.pdf an  algorithm which devoloped by Ulrik brands
%
%
% Example:
%	[BetweennessCentrality, Nodes] = mexGraphBetweennessCentrality(Graph,'inverse');
%
%
% See Also:
%       mexGraphSqueeze
%
% Created:
% by inspiration of graph tool box which created Lev Muchnik 
% Royi Itzhak - Bar Ilan University ,Isreal
% 972-35317165 
% royi.its@gmail.com
%
% Major Update:
%   Lev Muchnik    09/2005, Tel.: 972-054-4326496
%   Code optimization and other improvements case 40-60% reduction in overall computation time.

⌨️ 快捷键说明

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