mexgraphcreaterandomgraph.m
来自「复杂网络的一些节点面对攻击的代码」· M 代码 · 共 24 行
M
24 行
function Graph = mexGraphCreateRandomGraph(NumberOfNodes,DistributionX,DistributionY,Directional)
% Generates a graph of given size and with the given node's degree distribution.
%
% Receives:
% NumberOfNodes - integer, scalar - approximate number of nodes in Graph
% DistributionX - integers, vector- list of degrees.
% DistributionY - floats, vector - list of probabilities to have node approprieate degree
% must have the same number of elements as 'DistributionX'
% Must not be normalized
% Directional - boolean, scalar - (optonal) Specifies whether the graph is directional or undirectional. Deafult: 1 (true).
% Directional graphs generation is much faster.
%
% Returns:
% Graph - struct, graph - Object created with ObjectGraphCreateRandomGraph an d containing the
% desired graph
% Example:
% Graph = mexGraphCreateRandomGraph(1000,[1 : 200],[1 : 200].^-2);
%
% See Also:
% ObjectCreateGraph
%
% Created:
% Lev Muchnik 10/03/2006, Tel.: 972-054-4326496, lev@topspin.co.il, Boston, MA
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?