I am writing a small code (sequential) to calculate Page Rank for a modest dataset (although not completely trivial).
The algo goes like this :
while ( not converged ) {
// Do a bunch of things to calculate PR
}
I am clear on the algorithm apart from the 'convergence' criteria. What is the best way to check if the algorithm has converged? Should I :
Check I keep a copy of all individual node's PR from an iteration and check all node's PR in the next iteration to be the same value?
This seems highly inefficient to me. Is this a right way to do it?