User login |
A PHP extension for PageRank algorithmIn order to support one of our ongoing projects, I developed a PHP extension for PageRank algorithm to conduct search result re-ranking from a PHP frontend. Using pure PHP to do the algorithm is consuming too much time for real-time response when the scale of re-ranking becomes larger. This PHP extension uses cblas and atblas libraries to speed up matrix computing. It also applies OpenMP on few places. After installing the .so file of this extension, you have a pagerank function in PHP to use. Usage example:
$array = array( $pi = array(0.16667, 0.16667, 0.16667, 0.16667, 0.16667, 0.16667); print_r(pagerank($pi, $array, $v, $n, $alpha, $threshold)); ?> By viirya at 2009-08-19 11:04 | login to post comments
|