[Lemon-user] Question related to preflow
Balázs Dezső
deba.mf at gmail.com
Wed May 16 14:42:32 CEST 2012
Hi,
As far as I know, this is the simplest solution.
Balazs
On Wed, May 16, 2012 at 2:38 PM, Attila Bernáth <athos at cs.elte.hu> wrote:
>> Dear All,
>>
>> I want to compute the (unique) inclusion-wise maximal minimum s-t cut
>> in a network.
>>
>> I found the following solution:
>>
>> //Find a maximum flow:
>> lemon::Preflow< Graph, typename Graph::template ArcMap<double> >
>> pre(auxG,auxCap,src,trg);
>> pre.run();
>> //Take the residual graph
>> typedef lemon::ResidualDigraph<const Graph, const typename
>> Graph::template ArcMap<double> > ResDigraph;
>> ResDigraph res(auxG,auxCap,pre.flowMap());
>> //Reverse its edges
>> lemon::ReverseDigraph< ResDigraph > revRes(res);
>> //Take a Bfs in it
>> lemon::Bfs< lemon::ReverseDigraph< ResDigraph > > befes(revRes);
>> befes.run(trg);
>>
>> The non-reached nodes are the ones I need.
>>
>> Is there a simpler solution for this problem?
>>
>> Thanks in advance.
>>
>> Attila
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
More information about the Lemon-user
mailing list