January 2020
Intermediate to advanced
640 pages
16h 56m
English
In order for a compute function to be used with the bspgraph package, it must adhere to the following signature:
type ComputeFunc func(g *Graph, v *Vertex, msgIt message.Iterator) error
The first argument to the compute function is a pointer to the Graph instance itself. This allows compute functions to use the graph API to query the current super-step number, look up aggregators, and send messages to vertices. The second argument is a pointer to the Vertex instance that the compute function is operating on, while the third and final argument is a message.Iterator for consuming the messages that were sent to the vertex during the previous super-step.
It is important to note that ...