Defining an API for the PageRank calculator

Now, let's discuss how we can implement a PageRank calculator on top of the functionality provided by the graph processing framework we have built. The full source code and tests for the PageRank calculator can be found in this book's GitHub repository in the Chapter08/pagerank folder.

The Calculator type is nothing more than a container for a bspgraph.Graph instance and a bunch of configuration options:

The executorFactory points to the executor factory that will be used to create new Executor instances each time we want to execute the PageRank algorithm on a graph. By default, the Calculator constructor ...

Get Hands-On Software Engineering with Golang now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.