|
ADS
Algorithms and Data Structures
|
The push-relabel of Goldberg and Tarjan, the way PUSH_RELABEL of FlowNetwork::maxFlow() [see MaxFlow.h], beyond the book: it keeps a preflow (more flow may enter a node than leave it) and labels that bound the distances from \( t \), with the node of the highest label discharged first, \( O( n^2 \sqrt{m} ) \) (Cheriyan and Maheshwari), and the global relabelings and the gaps of Cherkassky and Goldberg, on which its speed depends in practice (see Flows, cuts and matchings). More...
Go to the source code of this file.
Namespaces | |
| namespace | ADS |
The push-relabel of Goldberg and Tarjan, the way PUSH_RELABEL of FlowNetwork::maxFlow() [see MaxFlow.h], beyond the book: it keeps a preflow (more flow may enter a node than leave it) and labels that bound the distances from \( t \), with the node of the highest label discharged first, \( O( n^2 \sqrt{m} ) \) (Cheriyan and Maheshwari), and the global relabelings and the gaps of Cherkassky and Goldberg, on which its speed depends in practice (see Flows, cuts and matchings).
From the flow there is it first looks for a residual path from \( s \) to \( t \) in the side of \( s \), and stops if there is none, and it takes the excesses that setCapacity() left where they are, so that a change of the capacities costs less than a computation from scratch; the visits of DINIC, which explore only the nodes reached from \( s \), remain the cheaper repair when the network is large and the change small.
The network, the other ways and the circulations are those of MaxFlow.h, which includes this header, so that either of the two gives the whole of FlowNetwork; this one defines its member pushRelabel().