Boost logo

Boost Users :

Subject: [Boost-users] array of small world graphs
From: Vasilis Hatzopoulos (algol55_at_[hidden])
Date: 2010-02-04 06:02:20


Hi all, new to boost and experiencing a bit of an issue with generating a collection of small worlds.
Basically i want for each pass of the loop to generate a small world with a certain pRewire.

Here's some code

typedef small_world_iterator<mt19937, Graph> SWGen;

base_generator_type generator(1u);

for(int i = 0; i < num_graphs; i++){

               Graph g( SWGen( generator, N, k, pRewire, SWGen(), N );
               .
               .
              some operations on g, i.e. path lengths e.t.c.
}

As it happens all graphs g are the same graph while what i want is a collection
of different small worlds with the same pRewire. Why does the state of the generator not
advance after the first Graph is generated?

Can anyone please help me with this.
Thanks for your time,
Vasilis.

      


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