Boost logo

Boost Users :

Subject: [Boost-users] [BGL] reset of the random number generator in the sorted_erdos_renyi_iterator
From: Marti Cuquet (cuquet_at_[hidden])
Date: 2009-10-08 05:23:26


Hi,

I noticed that when generating several graphs with the
sorted_erdos_renyi_iterator with the same random generator all of them
happen to be the same. Looking at erdos_renyi_generator.hpp I see that
there is a reset in the generator.

This does not happens in the normal (unsorted) erdos_renyi_iterator
since the generator is passed by reference in the constructor.

I'm still not confortable with the BGL and the random libraries, but I
might say that it is better to pass the random generator by reference.
Is there a special reason for not doing so?

Thank you,
Martí


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net