当前位置: 首页 > news >正文

盐城建设厅网站设计备案网站建设168

盐城建设厅网站设计备案,网站建设168,网站制作论文致谢,wordpress首页缓慢社区#xff08;community#xff09;定义#xff1a;同一社区内的节点与节点之间关系紧密#xff0c;而社区与社区之间的关系稀疏。 设图GG(V,E),所谓社区发现是指在图G中确定nc(1)个社区C{C1,C2,...,Cnv},使得各社区的顶点集合构成V的一个覆盖。 若任意两个社区的顶点…社区community定义同一社区内的节点与节点之间关系紧密而社区与社区之间的关系稀疏。 设图GG(V,E),所谓社区发现是指在图G中确定nc(1)个社区C{C1,C2,...,Cnv},使得各社区的顶点集合构成V的一个覆盖。 若任意两个社区的顶点集合的交际均为空则称C为非重叠社区disjoint communities;否则称为重叠社区overlapping communities。   SLPA(Speaker-listener Label Propagation Algorithm)算法是一种社区发现算法它是对LPA算法标签传播算法的拓展。 算法思想如下 输入参数迭代次数T满足社区次数要求的阈值r 输出参数每一个节点的社区分布 1首先每一个节点的存储器中初始化一个唯一的标签。 2然后重复进行以下步骤直到达到最大迭代T   a. 选择一个节点作为监听器   b. 所选节点的每个邻居随机选择概率正比于该标签在其存储器中的出现频率的标签把所选择的标签speakervote发送到听众listener;   c. 监听器增加接收到的最流行的标签到内存。 3最后根据在存储器里的标签和阈值r后处理被用于输出社区。 1 public int speakerVote() {2 //Run through each element in the map to create a cumulative distribution3 SetInteger communityIds communityDistribution.keySet();4 ArrayListInteger communities new ArrayListInteger();5 ArrayListInteger cumulativeCounts new ArrayListInteger();6 7 int sum-1;8 for (Integer comm: communityIds) {9 sum communityDistribution.get(comm); 10 communities.add(comm); 11 cumulativeCounts.add(sum); 12 } 13 14 //Generate a random integer in the range [0,sum) 15 int rand RandomNumGenerator.getRandomInt(sum1); 16 17 //Find the index of first value greater than rand in cumulativeCounts 18 int i0; 19 for (i0; icumulativeCounts.size(); i) { 20 if (cumulativeCounts.get(i)rand) 21 break; 22 } 23 24 //Return the corresponding community 25 return communities.get(i); 26 } SpeakerVote 1 public void updateLabels(Integer userId){2 SetDefaultWeightedEdge incomingEdges userNodegraph.getGraph().incomingEdgesOf(userId);//获取所有该顶点的入度顶点3 MapInteger, Integer incomingVotes new HashMapInteger, Integer();//所有speaker顶点投票情况4 5 //For each vertex V with an incoming edge to the current node6 for ( DefaultWeightedEdge edge: incomingEdges ) {7 int speakerId userNodegraph.getGraph().getEdgeSource(edge);8 UserNode speakerNode userNodegraph.getNodeMap().get(speakerId);9 10 int votedCommunity speakerNode.speakerVote(); 11 int votedCommunitycount 1; 12 if ( incomingVotes.containsKey(votedCommunity)){ 13 votedCommunitycount incomingVotes.get(votedCommunity); 14 } 15 incomingVotes.put(votedCommunity, votedCommunitycount); 16 } 17 18 //Find the most popular vote 19 IteratorEntryInteger, Integer it incomingVotes.entrySet().iterator(); 20 int popularCommunity-1; 21 int popularCommunityCount0; 22 while ( it.hasNext()) { 23 EntryInteger, Integer entry it.next(); 24 if ( entry.getValue() popularCommunityCount ) { 25 popularCommunity entry.getKey(); 26 popularCommunityCount entry.getValue(); 27 } 28 } 29 //Update community distribution of the current node by 1 30 UserNode currentNode userNodegraph.getNodeMap().get(userId); 31 currentNode.updateCommunityDistribution(popularCommunity, 1); 32 } listenerUpdateCommunity  注源代码请联系limin12891163.com.    转载于:https://www.cnblogs.com/limin12891/p/5660350.html
http://www.zqtcl.cn/news/337672/

相关文章:

  • 手机网站 需求模板3000元建设个人网站
  • 请人做网站域名和主机thinkphp网站开发实战教程
  • 做地产网站哪家好饮料网站建设价格
  • 外管局网站 报告怎么做wordpress 阿里
  • 湘潭做网站 去磐石网络山西自助建站费用低
  • 温州哪里做网站比较好昆明网页制作开发
  • 网站建设淘宝客网站建设与网页设计入门
  • 网站推广营销联系方式俄语免费网站制作
  • 广东企业网站seo点击软件搭建本地网站
  • 商丘做网站的价格专业网站制作哪家强
  • 瑞安微信网站软件公司网站设计与制作
  • 片头网站网站建设服装在线商城实训报告
  • wordpress做企业网站怎样做网页推广
  • 网站建设售后服务安全维护企业网站开发 外文文献
  • 网站设计英文翻译系统开发的五个阶段
  • 成华区门户网站拍卖网站开发多少钱
  • html设计网站wordpress 评论增加字段
  • 搭建正规网站小程序开发难不难
  • 做静态网站用什么软件自己编写代码建设微网站
  • 备案网站ipoa系统主要干什么的
  • 杭州专业网站建设在哪里wordpress主题重置
  • 仿wordpress站赣州专业网站推广
  • 网站开发需要多长时间python链接wordpress
  • 网上交易网邯郸网站seo
  • wordpress图片后加载外链seo服务
  • 婚庆公司网站建设腾讯广告建站工具
  • 焦作建设厅网站wordpress调用视频播放器
  • 网站版面做好江苏省建设工程设计施工图审核中心网站
  • 智能网站平台wordpress同步头条
  • 做采集的网站有流量吗广州建设学校