|
Boost Users : |
Subject: Re: [Boost-users] self_loop=false for Unique R-MAT generator
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2013-11-22 11:04:55
On Fri, 22 Nov 2013, Ðиколай ÐÐ¸Ð½Ð°Ñ wrote:
>
> Hi.
>
> I use Parallel Boost Graph Library to create network  BarabásiâAlbert (BA) model
The R-MAT graph model is different from the BA model; are you sure you
want R-MAT?
> int main(int argc, char* argv[])
> {
> boost::mpi::environment env(argc, argv);
> boost::minstd_rand gen;
> Graph g(RMATGen(gen, 100, 400, 0.3, 0.1, 0.2, 0.03), RMATGen(), 100);
>
> write_graphviz(std::cout, g);
>
> }
>
> This graph always have self-loops vertex. Â How i can to forbid self_loop
> for Unique R-MAT generator ?
It looks like there isn't a built-in way to do that. However, you can use
a boost::filter_iterator
(http://www.boost.org/doc/libs/1_55_0/libs/iterator/doc/filter_iterator.html)
around the R-MAT iterators that returns false on self-loops to get the
behavior you want.
-- Jeremiah Willcock
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