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.

Worst-Case Running Time: All functions for computing maximum or minimum<br />

weighted (perfect or non-perfect) matchings guarantee a running time of O(nm log n),<br />

where n and m denote the number of nodes and edges, respectively.<br />

template <br />

list MAX WEIGHT MATCHING T(const graph& G, const edge array& w,<br />

bool check = true, int heur = 2)<br />

computes a maximum-weight matching M of the undirected graph G with<br />

weight function w. If check is set to true, the optimality of M is checked<br />

internally. <strong>The</strong> heuristic used for the construction of an initial matching<br />

is determined by heur.<br />

Precondition: All edge weights must be non-negative.<br />

template <br />

list MAX WEIGHT MATCHING T(const graph& G, const edge array& w,<br />

node array& pot, array& BT, node array& b,<br />

bool check = true, int heur = 2)<br />

computes a maximum-weight matching M of the undirected graph G<br />

with weight function w. <strong>The</strong> function provides a proof of optimality in<br />

the form of a dual solution given by pot, BT and b. If check is set to<br />

true, the optimality of M is checked internally. <strong>The</strong> heuristic used for<br />

the construction of an initial matching is determined by heur.<br />

Precondition: All edge weights must be non-negative.<br />

template <br />

bool CHECK MAX WEIGHT MATCHING T(const graph& G,<br />

const edge array& w,<br />

const list& M,<br />

const node array& pot,<br />

const array& BT , const node array& b)<br />

checks if M together with the dual solution represented by pot, BT and<br />

b are optimal. <strong>The</strong> function returns true if M is a maximum-weight<br />

matching of G with weight function w.<br />

template

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

Saved successfully!

Ooh no, something went wrong!