Boost logo

Boost :

Subject: Re: [boost] CSR graph in max flow
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-04-16 17:39:33


Yes, you can just use a patch, or just copy over
<URL:https://svn.boost.org/svn/boost/trunk/boost/graph/
compressed_sparse_row_graph.hpp> on top of your version.

-- Jeremiah Willcock

On Fri, 16 Apr 2010, Dan Jiang wrote:

>
> Ok. Using named parameters works (i.e., no compile errors).
> Now I'd have to wait for your fix for the edge() issue. I am using the release load 1.42. Since this is minor change (I hope), can I simply use your fix as a patch without switching to use development branch? If yes, can you send me the fix by email?
> Many thanks,
> Dan
>> Date: Fri, 16 Apr 2010 15:42:23 -0400
>> From: jewillco_at_[hidden]
>> To: boost_at_[hidden]
>> Subject: Re: [boost] CSR graph in max flow
>>
>> On Fri, 16 Apr 2010, Dan Jiang wrote:
>>
>>>
>>> Hi Jeremiah,
>>> Here is the code and error. Thanks again for your help.
>>> -Dan
>>> ==========================================
>>> typedef compressed_sparse_row_graph<directedS> Traits;
>>> struct EdgeProp{ float capacity; float residual_capacity; Traits::edge_descriptor reverse_edge; };
>>> typedef compressed_sparse_row_graph<directedS,
>>> property<vertex_index_t, DWORD32>,
>>> EdgeProp,
>>> no_property, // Graph Property
>>> DWORD32, // Vertex Type
>>> DWORD32> // EdgeIndex Type
>>> BOOST_Graph;
>>> The code that errors out: flow = (float)push_relabel_max_flow(g, s, t);
>>
>> Since you are using bundled properties, you need to give the capacity,
>> residual, and reverse edge maps explicitly as arguments to
>> push_relabel_max_flow. Please add those as separate arguments (using the
>> named parameter mechanism) and see if that helps. I don't know why the
>> maps default to identity_property_map -- that seems like it will basically
>> never work. Also, the push_relabel_max_flow code shouldn't be using
>> operator[]. Are you using the Boost trunk or a release version? I can
>> put some fixes into the trunk for some of these issues.
>>
>> -- Jeremiah Willcock
>> _______________________________________________
>> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
> _________________________________________________________________
> Hotmail & Messenger. Get them on your phone now.
> http://go.microsoft.com/?linkid=9724463
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk