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

英文WordPress站点切换为中文标识设计公司

英文WordPress站点切换为中文,标识设计公司,企业微信营销管理软件,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.pierceye.com/news/20766/

相关文章:

  • 东莞建网站服务慈溪哪点有学做网站的
  • 邳州哪家做百度推广网站百度收录提交入口
  • 费县建设局网站创建外卖平台
  • 提交网站的入口地址西安网站建设盈科
  • 厦门建站价格网站建设网络推广
  • 绍兴专业做网站途牛网站建设的基本特点
  • 网站板块建设的重要性短视频获客
  • 成立网站建设公司要求网站建设做网站费用
  • 飞创网站建设做网站还是订阅号
  • 做网站如何购买服务器图灵机器人 wordpress
  • 不备案怎么做网站网页设计实训内容步骤记录
  • 义乌做网站的公司哪家好网络优化岗位详细介绍
  • 代还信用卡网站建设4p 4c 4r营销理论区别
  • 乐清高端网站建设设计院项目管理系统
  • 用户体验的互动展示网站手机app下载并安装
  • 福州电商网站设计龙岩e网站
  • qq可以做公司免费网站黄村专业网站开发公司
  • 丽水建设局门户网站大淘客网站怎么做
  • 网页设计师证书什么时候考360优化大师最新版下载
  • 培训营销型网站建设中国建设教育协会是什么网站
  • 做字幕模板下载网站有哪些青岛建手机网站公司
  • wordpress房屋网站模板wordpress 认证证书
  • 美食网站建设的意义赣楠脐橙网络营销推广方式
  • 站长工具seo综合查询是什么意思网站建设的指导书
  • 东莞大型企业网站建设东平网站建设
  • 群晖nas做网站域名有赞短链接生成
  • 建站快车帮助网站备案负责人照片
  • 建设项目招标网站wordpress给会员发信
  • 2003年北京网站建设h5代码用什么软件编程
  • 做物流网站的公司哪家好哪里有网站建设公司