The implementation of the algorithm PageRank
The code stems from one of the homework of the course information retrieval.
- Compilation
- gcc -o pagerank -std=c99 -O3 -lm pagerank.c
- Running
- ./pagerank -d -e -o
- d: Dumping factor
- e: Convergence threshold
- o: Path of the output file
PageRank is implemented using Markov chain. We do not directly compute the eigenvalues since the latter takes more time in practice. (to be honest, the latter is more difficult to implement in C :))
Each graph is constructed using an adjacency list.