31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

inline NT MAX FLOW GRH T(const graph& G, node s, node t,<br />

const edge array& cap, edge array& flow,<br />

SET & U, int& num pushes,<br />

int& num edge inspections, int& num relabels,<br />

int& num global relabels, float h)<br />

<strong>The</strong> preflow push method with the distinction between low and high nodes,<br />

the local relabeling heuristic, the global relabeling heuristic, and the two-phase<br />

approach. <strong>The</strong> global relabeling heuristic is applied every h·m edge inspections.<br />

template <br />

inline NT MAX FLOW GAP T(const graph& G, node s, node t,<br />

const edge array& cap, edge array& flow,<br />

SET & U, int& num pushes,<br />

int& num edge inspections, int& num relabels,<br />

int& num global relabels, int& num gaps, float h)<br />

<strong>The</strong> preflow push method with the distinction between low and high nodes,<br />

the local relabeling heuristic, the global relabeling heuristic, the two-phase approach,<br />

and the gap heuristic. <strong>The</strong> global relabeling heuristic is applied every<br />

h · m edge inspections.<br />

<strong>The</strong> following generators can be used to generate max-flow problems with integer capacities.<br />

<strong>The</strong> generators return a GRAPH G and nodes s and t. <strong>The</strong> edge capacities<br />

are available as edge data, i.e., the capacity of edge e is available as G[e] and the edge array<br />

of capacities is passed as G.edge data( ). For detailed information about the generators<br />

we refer to the <strong>LEDA</strong> book.<br />

void max flow gen rand(GRAPH & G, node& s, node& t, int n, int m)<br />

A random graph with n nodes, m edges, and random edge capacities in [2,11]<br />

for the edges out of s and in [1,10] for all other edges.<br />

void max flow gen CG1(GRAPH & G, node& s, node& t, int n)<br />

A generator suggested by Cherkassky and Goldberg.<br />

void max flow gen CG2(GRAPH & G, node& s, node& t, int n)<br />

Another generator suggested by Cherkassky and Goldberg.<br />

void max flow gen AMO(GRAPH & G, node& s, node& t, int n)<br />

A generator suggested by Ahuja, Magnanti, and Orlin.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!