[{"data":1,"prerenderedAt":187},["ShallowReactive",2],{"/nw/generate-preferential-attachment":3,"/nw/generate-preferential-attachment-surround":176},{"id":4,"title":5,"body":6,"description":142,"extension":143,"meta":144,"navigation":162,"path":172,"seo":173,"stem":174,"__hash__":175},"content/nw/generate-preferential-attachment.md","Networks Extension Dictionary: generate-preferential-attachment",{"type":7,"value":8,"toc":131},"minimark",[9],[10,11,15,16,15,26,60,71,81,87],"div",{"className":12,"id":14},[13],"dict_entry","generate-preferential-attachment","\n  ",[17,18,20,21,15],"h3",{"id":19},"nwgenerate-preferential-attachment","\n    ",[22,23,25],"a",{"href":24},"#generate-preferential-attachment","nw:generate-preferential-attachment",[27,28,32],"h4",{"id":29,"className":30},"nwgenerate-preferential-attachment-turtle-breed-link-breed-num-nodes-min-degree-optional-command-block",[31],"section-heading",[22,33,20,37,15],{"className":34,"href":36},[35],"section-anchor","#----nwgenerate-preferential-attachment-turtle-breed-link-breed-num-nodes-min-degree-optional-command-block--",[38,39,42,43,47,48,47,51,47,54,47,57],"span",{"className":40},[41],"prim_example","nw:generate-preferential-attachment ",[44,45,46],"i",{},"turtle-breed"," ",[44,49,50],{},"link-breed",[44,52,53],{},"num-nodes",[44,55,56],{},"min-degree",[44,58,59],{},"optional-command-block",[61,62,63,64,70],"p",{},"Generates a new network using a version of the ",[22,65,69],{"href":66,"rel":67},"https://en.wikipedia.org/wiki/Barab%C3%A1si%E2%80%93Albert_model",[68],"nofollow","Barabási–Albert"," algorithm. This network will have the property of being “scale free”: the distribution of degrees (i.e. the number of links for each turtle) should follow a power law.",[61,72,73,74,77,78,80],{},"Generation works as follows turtles are added, one by one, each forming ",[75,76,56],"code",{}," links to a previously added turtles, until ",[75,79,53],{}," is reached.\nThe more links a turtle already has, the greater the probability that new turtles form links with it when they are added.",[61,82,83,84,86],{},"If you specify an ",[75,85,59],{},", it is executed for each turtle in the newly created network. For example:",[88,89,90],"pre",{},[75,91,92,47,97,47,102,47,106,47,111,115,116,47,121,47,125,130],{},[38,93,25],{"className":94},[95,96],"token","variable",[38,98,101],{"className":99},[95,100],"reporter","turtles",[38,103,105],{"className":104},[95,100],"links",[38,107,110],{"className":108},[95,109],"number","100",[38,112,114],{"className":113},[95,109],"1"," [ ",[38,117,120],{"className":118},[95,119],"command","set",[38,122,124],{"className":123},[95,100],"color",[38,126,129],{"className":127},[95,128],"constant","red"," ]",{"title":132,"searchDepth":133,"depth":134,"links":135},"",5,3,[136],{"id":19,"depth":134,"text":137,"children":138},"\n    nw:generate-preferential-attachment\n  ",[139],{"id":29,"depth":140,"text":141},4,"\n    nw:generate-preferential-attachment turtle-breed link-breed num-nodes min-degree optional-command-block\n  ","Documentation for the generate-preferential-attachment primitive.","md",{"source":145,"metadataOutputPath":146,"projectConfig":147,"language":155,"inheritFrom":163,"output":162,"version":148,"layout":164,"dictionaryDisplayName":165,"dictionaryHomeDirectory":166,"indexFileURI":167,"currentItemId":14,"currentItemLabel":25,"primRoot":168,"icon":169,"extensionName":170,"assetsRoot":150},"../../external/extensions/nw/nw/generate-preferential-attachment.md","content/nw/generate-preferential-attachment.metadata.yaml",{"version":148,"projectRoot":149,"scanRoot":150,"outputRoot":151,"defaults":152,"engine":158,"partials":159,"dedupeIdenticalDiskWrites":162},"7.0.4",".","/home/runner/work/Helio/Helio/external/extensions/nw","content",{"inheritFrom":153,"language":155,"output":156,"extension":143,"title":157,"version":148},[154],0,"en",false,"NetLogo User Manual","mustache",{"directoryPaths":160,"extensions":161},[149],[158,143],true,[154],"catalog","Networks Extension Dictionary","/nw.html","/_index/extensions/nw.txt","nw","i-lucide-network",{"shortName":168,"fullName":171},"Networks","/nw/generate-preferential-attachment",{"title":5,"description":142},"nw/generate-preferential-attachment","cPD9x-qpf_P0akbn70Nl88kg4mnl1GS7ntzSdxkNRgA",[177,182],{"title":178,"path":179,"stem":180,"description":181,"children":-1},"Networks Extension Dictionary: generate-lattice-2d","/nw/generate-lattice-2d","nw/generate-lattice-2d","Documentation for the generate-lattice-2d primitive.",{"title":183,"path":184,"stem":185,"description":186,"children":-1},"Networks Extension Dictionary: generate-random","/nw/generate-random","nw/generate-random","Documentation for the generate-random primitive.",1777657777413]