### 5.5. `igraph_pagerank_old` — Calculates the Google PageRank for the specified vertices.

```int igraph_pagerank_old(const igraph_t *graph, igraph_vector_t *res,
const igraph_vs_t vids, igraph_bool_t directed,
igraph_integer_t niter, igraph_real_t eps,
igraph_real_t damping, igraph_bool_t old);
```

This is an old implementation, it is provided for compatibility with igraph versions earlier than 0.5. Please use the new implementation `igraph_pagerank()` in new projects.

Please note that the PageRank of a given vertex depends on the PageRank of all other vertices, so even if you want to calculate the PageRank for only some of the vertices, all of them must be calculated. Requesting the PageRank for only some of the vertices does not result in any performance increase at all.

Since the calculation is an iterative process, the algorithm is stopped after a given count of iterations or if the PageRank value differences between iterations are less than a predefined value.

For the explanation of the PageRank algorithm, see the following webpage: http://www-db.stanford.edu/~backrub/google.html, or the following reference:

Sergey Brin and Larry Page: The Anatomy of a Large-Scale Hypertextual Web Search Engine. Proceedings of the 7th World-Wide Web Conference, Brisbane, Australia, April 1998.

Arguments:

 `graph`: The graph object. `res`: The result vector containing the PageRank values for the given nodes. `vids`: Vector with the vertex ids `directed`: Logical, if true directed paths will be considered for directed graphs. It is ignored for undirected graphs. `niter`: The maximum number of iterations to perform `eps`: The algorithm will consider the calculation as complete if the difference of PageRank values between iterations change less than this value for every node `damping`: The damping factor ("d" in the original paper) `old`: Boolean, whether to use the pre-igraph 0.5 way to calculate page rank. Not recommended for new applications, only included for compatibility. If this is non-zero then the damping factor is not divided by the number of vertices before adding it to the weighted page rank scores to calculate the new scores. I.e. the formula in the original PageRank paper is used. Furthermore, if this is non-zero then the PageRank vector is renormalized after each iteration.

Returns:

 Error code: `IGRAPH_ENOMEM`, not enough memory for temporary data. `IGRAPH_EINVVID`, invalid vertex id in `vids`.

Time complexity: O(|V|+|E|) per iteration. A handful iterations should be enough. Note that if the old-style dumping is used then the iteration might not converge at all.

 `igraph_pagerank()` for the new implementation.