ALP User Documentation 0.7.0
Algebraic Programming User Documentation
Public Attributes | List of all members
PregelState Struct Reference

The state of the vertex-center Pregel program that the user may interface with. More...

#include <pregel.hpp>

Public Attributes

bool & active
 Represents whether the current vertex is active. More...
 
const size_t & indegree
 The in-degree of this vertex.
 
const size_t & num_edges
 The number of edges in the global graph.
 
const size_t & num_vertices
 The number of vertices in the global graph.
 
const size_t & outdegree
 The out-degree of this vertex.
 
const size_t & round
 The current round the vertex-centric program is currently executing.
 
const size_t & vertexID
 A unique ID of this vertex. More...
 
bool & voteToHalt
 Represents whether this (active) vertex votes to terminate the program. More...
 

Detailed Description

The state of the vertex-center Pregel program that the user may interface with.

The state includes global data as well as vertex-centric state. The global state is umodifiable and includes:

Vertex-centric state can be either constant or modiable:

Member Data Documentation

◆ active

bool& active

Represents whether the current vertex is active.

Since this struct is only to-be used within the computational phase of a vertex-centric program, this always reads true on the start of a round.

The program may set this field to false which will cause this vertex to no longer trigger computational steps during subsequent rounds.

An inactive vertex will no longer broadcast messages.

If all vertices are inactive the program terminates.

◆ vertexID

const size_t& vertexID

A unique ID of this vertex.

This number is an unsigned integer between 0 (inclusive) and the number of vertices the underlying graph holds (exclusive).

◆ voteToHalt

bool& voteToHalt

Represents whether this (active) vertex votes to terminate the program.

On start of a round, this entry is set to false. If all active vertices set this to true, the program will terminate after the current round.


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