FlashGraph-ng
A new frontier in large-scale graph analysis and data mining
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
fg::compute_vertex Class Reference

Class from which users' vertex-centric programs should inherit. Serial code written when implementing run*. methods here will be run in parallel within the graph engine. More...

#include <graph_engine.h>

Inheritance diagram for fg::compute_vertex:
fg::compute_directed_vertex

Public Member Functions

 compute_vertex (vertex_id_t id)
 The constructor called by graph_engine to create vertex state. More...
 
void request_vertices (vertex_id_t ids[], size_t num)
 This allows a vertex to request the adjacency lists of vertices in the graph. More...
 
void request_vertex_headers (vertex_id_t ids[], size_t num)
 This requests the vertex headers. It mainly contains the number of edges (the number of in-edges and out-edges for directed vertices). More...
 
void notify_iteration_end (vertex_program &prog)
 Allows a vertex to perform a task at the end of every iteration. More...
 
void run_on_vertex_header (vertex_program &prog, const vertex_header &header)
 This method is invoked by calling the request_vertex_headers method and is where one would access the vertex in/out edges. More...
 
void run_on_message (vertex_program &vprog, const vertex_message &msg)
 This method is invoked when the vertex receives a message. More...
 

Detailed Description

Class from which users' vertex-centric programs should inherit. Serial code written when implementing run*. methods here will be run in parallel within the graph engine.

Constructor & Destructor Documentation

fg::compute_vertex::compute_vertex ( vertex_id_t  id)
inline

The constructor called by graph_engine to create vertex state.

Note that users never need to explictly call this ctor.

Member Function Documentation

void fg::compute_vertex::notify_iteration_end ( vertex_program prog)
inline

Allows a vertex to perform a task at the end of every iteration.

Parameters
progThe vertex program associated with running the graph algorithm.
void fg::compute_vertex::request_vertex_headers ( vertex_id_t  ids[],
size_t  num 
)

This requests the vertex headers. It mainly contains the number of edges (the number of in-edges and out-edges for directed vertices).

Parameters
idsThe IDs of vertices.
numThe number of vertex IDs you are requesting.
void fg::compute_vertex::request_vertices ( vertex_id_t  ids[],
size_t  num 
)

This allows a vertex to request the adjacency lists of vertices in the graph.

Parameters
idsThe IDs of vertices.
numThe number of vertex IDs you are requesting.
void fg::compute_vertex::run_on_message ( vertex_program vprog,
const vertex_message msg 
)
inline

This method is invoked when the vertex receives a message.

Parameters
vprogThe vertex program.
msgThe message sent to the vertex.
void fg::compute_vertex::run_on_vertex_header ( vertex_program prog,
const vertex_header &  header 
)
inline

This method is invoked by calling the request_vertex_headers method and is where one would access the vertex in/out edges.

Parameters
progThe vertex program.
headerThe vertex header object.

The documentation for this class was generated from the following file: