Although PageRank was initially designed to work with directed graphs, and with no weights in links, the algorithm can be easily extended to model undirected graphs whose edges are weighted.
let G = (V, E) be an undirected graph with the set of vertices V and set of edges E. For a given vertex v i , let In(v i ) be the set of vertices pointing to it 5 .