Subject: Re: [boost] [BGL] Testing a graph for bipartiteness
From: Matthias Walter (xammy_at_[hidden])
Date: 2010-03-06 06:54:07
>> I experimented with some solutions and don't really like the
>> hook-calling by hand. As you seem to like something really generic, I
>> finally decided to go with the VisitorEventList, i.e. I split the
>> functionality into bipartition_colorize, bipartiton_check and
>> property_put functors which are then thrown together in the DFS call.
>> The latter might be worth including into visitors.hpp, I think: It takes
>> a property map plus a value of it and just sets the value when called. I
>> use this to initialize the start vertex to be white, but it doesn't
>> require the property map to be a color map and can work on vertices and
>> edges and thus all possible visitors. But this is up to you to move it
>> to visitors.hpp if you like it.
> I put it in visitors.hpp and added documentation in
> libs/graph/doc/property_put.html; please see what you think of it.
Looks good! Modified the version on Boost Vault to use it from there.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk