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
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())); }
void apply(icontext_type& context, vertex_type& vertex, const gather_type& total) { ASSERT_EQ( total, int(vertex.num_in_edges()) ); }
void apply(icontext_type& context, vertex_type& vertex, const gather_type& total) { graphlab::timer::sleep_ms(100); ASSERT_EQ( total, int(vertex.num_in_edges() + vertex.num_out_edges() ) ); }