资源简介
计算节点介数,分析网络个体的重要性。简单地讲,一个节点的Betweenness表示所有的节点对之间通过该节点的最短路径条数。Betweenness很好地描述了网络中节点可能需要承载的流量。
代码片段和文件信息
function [bcE] = betweenness_centrality(Avarargin)
% BETWEENNESS_CENTRALITY Compute the betweenness centrality for vertices.
%
% bc = betweenness_centrality(A) returns the betweenness centrality for
% all vertices in A.
%
% [bcE] = betweenness_centrality(A) returns the betweenness centrality for
% all vertices in A along with a sparse matrix with the centrality for each
% edge.
%
% This method works on weighted or weighted directed graphs.
% For unweighted graphs (options.unweighted=1) the runtime is O(VE).
% For weighted graphs the runtime is O(VE + V(V+E)log(V)).
%
% ... = betweenness_centrality(A...) takes a set of
% key-value pairs or an options structure. See set_matlab_bgl_options
% for the standard options.
% options.unweighted: use the slightly more efficient unweighted
% algorithm in the case where all edge-weights are equal [{0} | 1]
% options.ec_list: do not form the sparse matrix with edge [{0} | 1]
% 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: the edge centrality can also be returned as an edge list using the
% options.ec_list options. This option can eliminate some ambiguity in the
% output matrix E when the edge centrality of an edge is 0 and Matlab drops
% the edge from the sparse matrix.
%
% Note: if the edge centrality matrix E is not requested then it is not
% computed and not returned. This yields a slight savings in computation
% time.
%
% Example:
% load graphs/padgett-florentine.mat
% betweenness_centrality(A)
% David Gleich
% Copyright Stanford University 2006-2008
%% History
% 2006-04-19: Initial version
% 2006-05-31: Added full2sparse check
% 2007-03-01: Added edge centrality output
% 2007-04-20: Added edge weight option
% 2007-07-09: Restricted input to positive edge weights
% 2007-07-12: Fixed edge_weight documentation.
% 2008-10-07: Changed options parsing
%%
[trans check full2sparse] = get_matlab_bgl_options(varargin{:});
if full2sparse && ~issparse(A) A = sparse(A); end
options = struct(‘unweighted‘ 0 ‘ec_list‘ 0 ‘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_weights = 1;
edge_weight_opt = options.edge_weight;
end
if check
% check the values
if options.unweighted ~= 1 && edge_weights ~= 1
check_matlab_bgl(Astruct(‘values‘1‘noneg‘1));
else
check_matlab_bgl(Astruct());
end
if edge_weights && any(edge_weights < 0)
error(‘matlab_bgl:invalidParameter‘ ...
‘the edge_weight array
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3525 2020-11-11 17:17 betweenness_centrality.m
相关资源
- matlab实现节点定位的三边定位算法
- 矢量编程潮流及最优潮流算法
- IEEE39节点系统下分析各支路暂态稳定
- IEEE 标准测试系统原始数据和潮流结果
- 比较分析协作通信三个节点时系统 (
- ieee33节点潮流计算 (ieee33 power flow)
- matlab计算复杂网络中节点的紧密中心
- ieee30节点的半不变量法概率潮流计算
- 基于改进型蜂群算法的无线传感器节
-
使用MATLAB中的simuli
nk,搭建配电网 - matlab生成网格编号每个单元的节点号
- matpower计算33节点电力系统潮流
- IEEE33Newton matlab上实现《电力系统分析
- PSO of IEEE33 IEEE33节点配电网系统中接
- IEEE30 30节点的潮流计算程序
- IEEE 118 节点的电力系统优化调度程序
- 配电网潮流计算程序2590999
- 配有ieee30节点配电网的潮流计算
- PV matlab编程
- 配电网潮流计算(disflowtry)
- B-spline-surface 在MATLAB-2008a环境下编写的
- 3 无线传感器网络的节点覆盖的研究
- test_ga12 用遗传算法进行无功优化
- 33 混合智能算法:采用人工神经网络
- BFSPDFS 广度优先搜索和深度优先搜索在
- opf--matpower 一个求取二机五节点的
- 3machines9bus
-
IEEE14 5机14节点simuli
nk仿真模型图 -
case_5 电力系统ieee5节点 simuli
nk模型 - Ant-colony-algorithm 蚁群算法
评论
共有 条评论