4 ms·
>> Google's entire PageRank computation can be done with a handful of iterations around a single call to GraphBLAS, using what I call the "PageRank semiring."
by chrisaycock 6y ago
>> Google's entire PageRank computation can be done with a handful of iterations around a single call to GraphBLAS, using what I call the "PageRank semiring."
The author has an example of PageRank in C:
https://github.com/DrTimothyAldenDavis/GraphBLAS/blob/stable/Demo/Source/dpagerank.c https://github.com/DrTimothyAldenDavis/GraphBLAS/blob/stable...
I assume his "single call" statement refers to the MATLAB version:
https://github.com/DrTimothyAldenDavis/GraphBLAS/blob/stable/Demo/MATLAB/dpagerank.m https://github.com/DrTimothyAldenDavis/GraphBLAS/blob/stable...
for i = 1:20
r = ((c*r) * C) + a * sum (r) ;
end
The MATLAB interface uses overloaded operators and methods on a GraphBLAS matrix object.
- DocSparse 6y agoI was referring to the PageRank_semiring in https://github.com/DrTimothyAldenDavis/GraphBLAS/blob/5e569f2fcb0597b4ad3c60fca1a4ff8e938fd111/Demo/Source/dpagerank2.c#L348 https://github.com/DrTimothyAldenDavis/GraphBLAS/blob/5e569f... . I wasn't counting the test for the termination condition -- in the statement in my interview, I assumed the # of iterations could just be given. I would guess that's the case for the Google PageRank computation, since the graph doesn't change so much each month when they compute it, they probably know how many iterations they need.