Boost logo

Boost Users :

Subject: Re: [Boost-users] Scale-free networks generation
From: davidrey123 (davidrey.maths_at_[hidden])
Date: 2013-03-07 20:10:42


Thank you for your answers.

Following the first answer by bminano, I have started using the
unique_rmat_iterator and for the meantime it feels pretty ok. As I also
wanted to have a connected graph and forbid "self edges", I coded a small
script to connect isolated nodes and remove "self edges" and the resulting
graphs fits my constraints.

>> 3-I read somewhere that Compressed Sparse Row (CSR) graphs could be used
>> to
>> represent scale-free networks, is there a way to use the corresponding
>> Boost
>> class to do so?

>Yes. As long as you have a list of (source, target) pairs, either from a
>graph generator or stored explicitly, you can create a Boost CSR graph
>with your data. The CSR implementation only supports directed and
>bidirectional graphs, however, so you'd need to put in each edge in both
>directions if you wanted undirected behavior.

Regarding the discussion on directed/undirected behavior, I believe that I
can encode my network as undirected graph and simply consider both directed
edges afterwards. I plan to use this network to simulate virus spreading
patterns and I initially wanted to use a bidirected graph to model the fact
that both nodes could infect each other but an undirected graph structure is
enough to start with.

Concerning the CSR implementation, this seems interesting, although as I am
quite knew to the Boost libs, I am not sure how to create a CSR graph.
However, since I do not plan to use Boost algorithms on my graphs, is there
any advantage in implementing a CSR graph with respect to the "regular"
implementation in Boost?

-David

--
View this message in context: http://boost.2283326.n4.nabble.com/Scale-free-networks-generation-tp4643888p4643940.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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