Subject: | pagerank is incorrectly computed |
the pagerank is not computed correctly when $d_factor is nonzero. Line
61 in PageRank.pm should be replaced with the line below:
$inv_d_factor * $self->{prvect} x $self->{graph} + $normal_factor;
note it could be replaced with
$inv_d_factor * $self->{prvect} x $self->{graph} + $normal_factor *
sum ($self->{prvect});
but since the sum of $self->{prvect} is always 1, it is unnecessary.
See http://www.ams.org/featurecolumn/archive/pagerank.html for details.
Also, while not a bug, the implementation does not handle the case of
dangling nodes in the digraph; the documentation should probably mention
this.