91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.98KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-03-28
  • 語言: Matlab
  • 標(biāo)簽: 網(wǎng)絡(luò)??

資源簡介

用matlab編程實(shí)現(xiàn)無標(biāo)度度網(wǎng)絡(luò)算法

資源截圖

代碼片段和文件信息

%???This?is?the?BA_Scale?Model?by?Fan?Jin.
%???At?first?there?are?only?m?nodes?and?no?edge?then?the?m+1st?node?is
%???connected?with?the?above?m?nodes
%???usage:?Nodes?=?BA(Nm)
%???the?parameter:N----network?size
%?????????????????m----a?new?node?with?m?new?edges
%???can?randomly?initialize?the?N?and?the?m?by?yourself
%???the??diagonal?elements?of?the?matrix?also?equal?to?-degree
%???Nodes----the?final?coupling?matrix
%???The?following?message(s)?may?not?be?displayed?correctly?for?they?contain?Chinese?charactors.
%???list----生成的一個(gè)輔助向量,該向量中的元素為每條邊端點(diǎn)的節(jié)點(diǎn)。for?example?假設(shè)網(wǎng)絡(luò)中節(jié)點(diǎn)4的度為7,則在list向量中會(huì)存在7個(gè)4,而這7個(gè)4的位置不一定是連續(xù)在一起的。
%???preferential?attachment體現(xiàn)在隨機(jī)的從list向量中選取元素,選中哪個(gè)元素,該元素表示的節(jié)點(diǎn)即被選中。由于list向量中每個(gè)節(jié)點(diǎn)的個(gè)數(shù)與它的度有關(guān),因此,度越大的點(diǎn)被選中的概率越大。
function?[NodesCii]=BA(Nm)
%?N=10m=3;
Nodes=zeros(N);
Cii=zeros(1N);
t=zeros(1N);
%Nodes=sparse(N);
for?i=1:m
????Nodes(im+1)=1;
????Nodes(m+1i)=1;
????A(i)=i;
end
for?i=m+1:2*m
????A(i)=m+1;
end
for?n=m+2:N???

評(píng)論

共有 條評(píng)論

相關(guān)資源