Implements the PageRank algorithm and query-based topic sensitive PageRank