If one of the critical needs of your program is to insert elements at the begining of a container: then you should use a std::deque and not a std::vector. std::vector is only good at inserting elements at the end.

Other containers have been introduced in C++11. I should start to find an updated graph with these new containers and insert it here.