graphkshell.m
来自「复杂网络的一些节点面对攻击的代码」· M 代码 · 共 36 行
M
36 行
function [KShell, varargout] = GraphKShell(Graph,K)
% Returns the complementary part of the K-Core of the goven graph.
%
% Receives:
% Graph - Graph Struct - Struct created with ObjectCreateGraph function (probanly called by GraphLoad).
% K - integer, >0 - K-degree of the K-core.
%
% Returns:
% KShell - Graph Struct - The original graph with all nodes, belonging to the K-Core removed.
% KCore - Graph Struct - (optional) The K-core of the original graph.
%
% Remarks:
% Notice, that each node in the original Graph is hosted in either K-Shell or K-Core.
% Links between nodes of each resultant graph (KShell of KCore) from the original Graph are kept,
% However, links between any node in KCore and any node in KShell are dropped.
%
% See Also:
% mexGraphKCore
%
%
%Created:
% Lev Muchnik, 19/04/06
% lev@topspin.co.il, +972-54-326496
error('NOT IMPLEMENTED YET!');
%{
error(nargchk(2,2,nargin));
error(nargoutchk(0,2,nargout));
KCore = mexGraphKCore(Graph,K);
KShell = GraphNodeRemove(Graph,GraphNodeIDs(KCore));
if nargout>1
varargout{1} = KCore;
end
%}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?