Implementation of pagerank algo in C++ using STL