资源简介
好不容易从国外网站找到的复杂网络的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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2007-08-16 09:37 Graph\
目录 0 2007-08-16 09:36 Graph\FlexIO\
文件 1084 2007-05-25 22:37 Graph\FlexIO\FIOAddParameter.m
文件 709 2007-05-25 22:37 Graph\FlexIO\FIOParameterNames.m
文件 1468 2007-05-25 22:37 Graph\FlexIO\FIOProcessInputParameters.m
文件 1439 2007-05-25 22:37 Graph\FlexIO\FIOTestInput.m
文件 2052 2005-03-18 21:14 Graph\GraphBetweennessCentrality.m
文件 4001 2005-07-02 18:30 Graph\GraphBetweennessDegreeHierarchy.m
文件 1574 2006-06-23 15:27 Graph\GraphComponents.m
文件 1545 2006-06-27 12:41 Graph\GraphComponentsDirected.m
文件 1140 2005-11-04 13:58 Graph\GraphConvertFromV2.m
文件 1109 2005-08-03 20:55 Graph\GraphCountNodeDegree.m
文件 2264 2005-10-20 12:59 Graph\GraphCountNodesDegree.m
文件 745 2004-05-26 10:00 Graph\GraphCountNumberOfli
文件 1013 2005-08-17 11:57 Graph\GraphCountNumberOfNodes.m
文件 1837 2004-05-31 12:49 Graph\GraphCountStatistics.m
文件 2870 2005-10-20 21:02 Graph\GraphCountUnderectionality.m
文件 1307 2006-03-10 22:07 Graph\GraphCreateRandomGraph.m
文件 3444 2005-02-14 18:09 Graph\GraphDrawGraphViz.m
文件 3183 2005-02-15 12:58 Graph\GraphDrawPajek.m
文件 3461 2005-12-01 09:23 Graph\GraphExportToFile.m
文件 12335 2007-01-29 08:31 Graph\GraphExportToGML.m
文件 1314 2005-03-20 14:15 Graph\GraphGenerateCompleteBipartiteGraph.m
文件 1146 2005-03-20 14:08 Graph\GraphGenerateCompleteGraph.m
文件 1057 2005-03-20 19:26 Graph\GraphGenerateCompleteKPartiteGraph.m
文件 1376 2006-12-12 14:00 Graph\GraphGetNodeNames.m
文件 3369 2005-08-07 13:22 Graph\GraphGetNodeProperty.m
文件 53511 2007-05-25 23:42 Graph\GraphGIUBrowseGraph.m
文件 488 2007-05-25 23:48 Graph\GraphGIUBrowseGraph.mat
文件 6978 2005-07-28 13:11 Graph\GraphGIUSelectGraph.m
文件 1167 2006-04-19 11:41 Graph\GraphKShell.m
............此处省略104个文件信息
相关资源
- ComplexNetworksPackage matlab复杂网络分析
- MATLAB Neural Network Toolbox官方教程
- RBF神经网络用于函数拟合与模式识别
- matlab开发-嵌入式编码器的QNXTargetSup
- 神经网络预测数据Neural Networks predic
- package_emdEMD的matlab程序
- NARXneuralnetwork
- network_analyer.mlpkginstall
- GSO package人工萤火虫群背包问题
- Takamoli
- SPIN_Matlab
- Fuzzy Neural Network by matlab 四个不同的
- 石墨烯的电导率计算 (Complex conduc
- matlab神经网络43个案例分析的代码及数
- 30 Bus Network2 Kabiri
- distribution-network-reconfiguration 电力系统
- 移动ad hoc网络路由协议仿真 (ad-hoc
- Cellular-Neural-Network 细胞神经网络(C
- Code2817164
- MANET
- LPR-neural-network 我自己做的一个基于神
- neural-network-of-multi-sensor 基于模糊神经
- MATLAB-Neural-network-cases 共有30个MATLAB神
- Matlab-co-interference 蜂窝小区同频干扰的
- Wavelet-network-timeseries 使用小波神经网
- BP-Load-forecasting 基于BP神经网络的短期
- DGnetwork1
- MATLAB-Identification-number 基于matlab 写的
- artificial-neural-network-method 基于人工神
- complex_network 用matlab所写的复杂网络所
评论
共有 条评论