Algorithm::PageRank - Calculate PageRank in Perl
use Algorithm::PageRank; $pr = new Algorithm::PageRank; $pr->graph([ 0 => 1, 0 => 2, 1 => 0, 2 => 1, ] ); $pr->iterate(); $pr->iterate(50); $pr->result();
This is a simple implementation of PageRank algorithm. Please do not expect it to be potent to cope with zilla-size of data.
Feed the graph topology. Vertices count from 0.
Calculate the pagerank vector. The parameter is the maximal number of iterations. If the vector does not converge before reaching the threshold, then calculation will stop at the maximum. Default iteration number is 100.
You can also reset the dampening factor ($Algorithm::PageRank::d_factor). The default value is 0.05.
Return the pagerank vector in PDL object format.
Copyright (C) 2004 by Yung-chung Lin (a.k.a. xern) <firstname.lastname@example.org>
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself