[BGL] bug in PLOD algorithm

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[BGL] bug in PLOD algorithm

Johan Oudinet
Hi,
I'm using Parrallel Boost Graph Library to generate some graphs and
compute their pagerank. I found the PLOD algorithm and I'd like using
it with bidirected graphs.

But, the PLOD algorithm generates self_edges whereas I put
allow_self_edges to false.
I look at the code in plod_generator.hpp and found that the
next(directed_tag) function never uses allow_self_edges boolean ! I
think it's a bug...
I suggest replace:
      current.second = x(*gen);
with:
      do {
        current.second = x(*gen);
      } while (current.first == current.second && !allow_self_loops);

Regards,
--
Johan
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [BGL] bug in PLOD algorithm

Doug Gregor-2

On Mar 14, 2006, at 5:57 AM, Johan Oudinet wrote:

> Hi,
> I'm using Parrallel Boost Graph Library to generate some graphs and
> compute their pagerank. I found the PLOD algorithm and I'd like using
> it with bidirected graphs.
>
> But, the PLOD algorithm generates self_edges whereas I put
> allow_self_edges to false.
> I look at the code in plod_generator.hpp and found that the
> next(directed_tag) function never uses allow_self_edges boolean ! I
> think it's a bug...
> I suggest replace:
>       current.second = x(*gen);
> with:
>       do {
>         current.second = x(*gen);
>       } while (current.first == current.second && !allow_self_loops);

Thanks for the fix! It's now in Boost CVS.

        Doug
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users