当前位置: 首页>>代码示例>>C++>>正文


C++ vertex_type::num_out_edges方法代码示例

本文整理汇总了C++中vertex_type::num_out_edges方法的典型用法代码示例。如果您正苦于以下问题:C++ vertex_type::num_out_edges方法的具体用法?C++ vertex_type::num_out_edges怎么用?C++ vertex_type::num_out_edges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vertex_type的用法示例。


在下文中一共展示了vertex_type::num_out_edges方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: scatter

    void scatter(icontext_type& context, const vertex_type& vertex,
            edge_type& edge) const {
        const vertex_type other = edge.target();
        pagerank_type value = vertex.data().pagerank / vertex.num_out_edges();
        assert(other.id() != vertex.id());
        const sum_pagerank_type msg(value);
        context.signal(other, msg);

    }
开发者ID:pkuwalter,项目名称:evaluation,代码行数:9,代码来源:PageRank.cpp

示例2: apply

 void apply(icontext_type& context, vertex_type& vertex,
            const factor_type& sum) {
   const size_t num_neighbors = vertex.num_in_edges() + vertex.num_out_edges();
   ASSERT_GT(num_neighbors, 0);
   // There should be no new edge data since the vertex program has been cleared
   vertex_data& vdata = vertex.data();
   ASSERT_EQ(sum.size(), NTOPICS);
   ASSERT_EQ(vdata.factor.size(), NTOPICS);
   vdata.nupdates++; vdata.nchanges = 0; 
   vdata.factor = sum;
 } // end of apply
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:11,代码来源:fast_cvb0_lda.cpp

示例3: apply

	void apply(icontext_type& context, vertex_type& vertex,
               const gather_type& total)
    	{
		sort_pool.push_back(make_pair(vertex.parse<vertex_data>().id,vertex.num_in_edges()+vertex.num_out_edges()));
		
	}
开发者ID:hanwentao,项目名称:saedb,代码行数:6,代码来源:enron.cpp

示例4: apply

 void apply(icontext_type& context, vertex_type& vertex,
            const gather_type& total) {
   ASSERT_EQ( total, int(vertex.num_out_edges()) );
 }
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:4,代码来源:async_consistent_test.cpp

示例5: empty

 /**
  * \brief Signal all vertices on one side of the bipartite graph
  */
 static graphlab::empty signal_left(icontext_type& context,
                                    vertex_type& vertex) {
   if(vertex.num_out_edges() > 0) context.signal(vertex);
   return graphlab::empty();
 } // end of signal_left 
开发者ID:carriercomm,项目名称:DPDK-Graph,代码行数:8,代码来源:als_vertex_program.hpp


注:本文中的vertex_type::num_out_edges方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。