资源简介
很有用的亲,MATLAB复杂网络少了他不行

代码片段和文件信息
function [BetweenneessCentrality varargout]= GraphBetweennessCentrality(GraphSourceNodes)
% Computes betweenneess centrality of each node.
%
% Receives:
% Graph - Graph Struct - the graph loaded with GraphLoad
% SourceNodes - array of double - (optional) nodes from which passes start. Default: [] (all nodes).
%
% Returns:
% BetweenneessCentrality - array of double - Betweenneess Centrality for each node.
% Nodes - array of double - (optional)List of all nodes for which betweennessn centrality is computed
%
% Algorithm:
% http://www.boost.org/libs/graph/doc/betweenness_centrality.html
%
% See Also:
% mexGraphAllNodeShortestPasses
%
warning(‘Use the more optimized mexGraphBetweennessCentrality.dll‘);
error(nargchk(12nargin));
error(nargoutchk(02nargout));
if ~exist(‘SourceNodes‘) | isempty(SourceNodes)
SourceNodes = unique(Graph.Data(:1));
end
Nodes = unique(Graph.Data(:1:2));
%TotalPasses = zeros(GraphCountNumberOfNodes(Graph)GraphCountNumberOfNodes(Graph));
Betweenness = zeros(GraphCountNumberOfNodes(Graph)1);
for Node = Nodes(:).‘
[ShortesPasses PassesHistogram]= mexGraphAllNodeShortestPasses(GraphNode);
%TotalPasses = TotalPasses + sum(PassesHistogram(2:end));
tic
for i = 1 : numel(ShortesPasses)
%T = ShortesPasses(i).Passes(end);
%TotalPasses(NodeShortesPasses(i).Passes(end)) = size(ShortesPasses(i).Passes2); % compute total number of shortes passes from Node to some other node.
Passes = ShortesPasses(i).Passes(2:end-1:);
NodesOnTheWay = unique(Passes);
if numel(NodesOnTheWay)==1
Count = 1; % hist behaves differently in this case.
else
Count = hist(Passes(:)NodesOnTheWay);
end
Betweenness(NodesOnTheWay(:)) = Betweenness(NodesOnTheWay(:))+ Count(:)/size(ShortesPasses(i).Passes2);
end
toc
disp(Node)
end
if nargout>1
varagout{1} = Nodes;
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7411 2007-05-25 23:12 matlab 复杂网络工具箱\fileslist.txt
文件 1084 2007-05-25 22:37 matlab 复杂网络工具箱\FlexIO\FIOAddParameter.m
文件 709 2007-05-25 22:37 matlab 复杂网络工具箱\FlexIO\FIOParameterNames.m
文件 1468 2007-05-25 22:37 matlab 复杂网络工具箱\FlexIO\FIOProcessInputParameters.m
文件 1439 2007-05-25 22:37 matlab 复杂网络工具箱\FlexIO\FIOTestInput.m
文件 2052 2005-03-18 21:14 matlab 复杂网络工具箱\GraphBetweennessCentrality.m
文件 4001 2005-07-02 18:30 matlab 复杂网络工具箱\GraphBetweennessDegreeHierarchy.m
文件 1574 2006-06-23 15:27 matlab 复杂网络工具箱\GraphComponents.m
文件 1545 2006-06-27 12:41 matlab 复杂网络工具箱\GraphComponentsDirected.m
文件 1140 2005-11-04 13:58 matlab 复杂网络工具箱\GraphConvertFromV2.m
文件 1109 2005-08-03 20:55 matlab 复杂网络工具箱\GraphCountNodeDegree.m
文件 2264 2005-10-20 12:59 matlab 复杂网络工具箱\GraphCountNodesDegree.m
文件 745 2004-05-26 10:00 matlab 复杂网络工具箱\GraphCountNumberOfli
文件 1013 2005-08-17 11:57 matlab 复杂网络工具箱\GraphCountNumberOfNodes.m
文件 1837 2004-05-31 12:49 matlab 复杂网络工具箱\GraphCountStatistics.m
文件 2870 2005-10-20 21:02 matlab 复杂网络工具箱\GraphCountUnderectionality.m
文件 1307 2006-03-10 22:07 matlab 复杂网络工具箱\GraphCreateRandomGraph.m
文件 3444 2005-02-14 18:09 matlab 复杂网络工具箱\GraphDrawGraphViz.m
文件 3183 2005-02-15 12:58 matlab 复杂网络工具箱\GraphDrawPajek.m
文件 3461 2005-12-01 09:23 matlab 复杂网络工具箱\GraphExportToFile.m
文件 12335 2007-01-29 08:31 matlab 复杂网络工具箱\GraphExportToGML.m
文件 1314 2005-03-20 14:15 matlab 复杂网络工具箱\GraphGenerateCompleteBipartiteGraph.m
文件 1146 2005-03-20 14:08 matlab 复杂网络工具箱\GraphGenerateCompleteGraph.m
文件 1057 2005-03-20 19:26 matlab 复杂网络工具箱\GraphGenerateCompleteKPartiteGraph.m
文件 1376 2006-12-12 14:00 matlab 复杂网络工具箱\GraphGetNodeNames.m
文件 3369 2005-08-07 13:22 matlab 复杂网络工具箱\GraphGetNodeProperty.m
文件 53511 2007-05-25 23:42 matlab 复杂网络工具箱\GraphGIUBrowseGraph.m
文件 488 2007-05-25 23:48 matlab 复杂网络工具箱\GraphGIUBrowseGraph.mat
文件 6978 2005-07-28 13:11 matlab 复杂网络工具箱\GraphGIUSelectGraph.m
文件 1167 2006-04-19 11:41 matlab 复杂网络工具箱\GraphKShell.m
............此处省略82个文件信息
相关资源
- 串行级联cpm系统MATLAB仿真
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
评论
共有 条评论