generate_random_graph
Newbie Question Can someone post a simple example of how to generate a random graph? I do not understand what needs to be sent in the 4th argument for RandNumGen. To keep it simple, how would I generate a random graph on 10 vertices and 20 edges? generate_random_graph(g, 10, 20, ?, false, false); Thanks, Matt
Matthew Galati wrote:
Newbie Question
Can someone post a simple example of how to generate a random graph? I do not understand what needs to be sent in the 4th argument for RandNumGen. To keep it simple, how would I generate a random graph on 10 vertices and 20 edges?
generate_random_graph(g, 10, 20, ?, false, false);
Looking at examples/bfs.cpp, I see the following: #include <boost/random/mersenne_twister.hpp> boost::mt19937 gen; .... boost::generate_random_graph(g, i, j, gen); I.e. the fourth parameter should be a functional object. Sorry that that docs don't say that... - Volodya
participants (2)
-
Matthew Galati
-
Vladimir Prus