Execute a Pregel-like iterative vertex-parallel abstraction.
the vertex data type
the edge data type
the Pregel message type
the input graph.
the message each vertex will receive at the first iteration
the maximum number of iterations to run for
the direction of edges incident to a vertex that received a message in
the previous round on which to run
sendMsg. For example, if this is
out-edges of vertices that received a message in the previous round will run. The default is
EdgeDirection.Either, which will run
sendMsg on edges where either side received a message
in the previous round. If this is
sendMsg will only run on edges where
*both* vertices received a message.
the user-defined vertex program which runs on each vertex and receives the inbound message and computes a new vertex value. On the first iteration the vertex program is invoked on all vertices and is passed the default message. On subsequent iterations the vertex program is only invoked on those vertices that receive messages.
a user supplied function that is applied to out edges of vertices that received messages in the current iteration
a user supplied function that takes two incoming messages of type A and merges them into a single message of type A. This function must be commutative and associative and ideally the size of A should not increase.
the resulting graph at the end of the computation