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.

list MAX WEIGHT PERFECT MATCHING T(const graph& G,<br />

const edge array& w,<br />

bool check = true,<br />

int heur = 2)<br />

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

G and weight function w. If G contains no perfect matching the empty<br />

set of edges is returned. If check is set to true, the optimality of M is<br />

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

matching is determined by heur.<br />

template <br />

list MAX WEIGHT PERFECT MATCHING T(const graph& G,<br />

const edge array& w,<br />

node array& pot,<br />

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

bool check = true,<br />

int heur = 2)<br />

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

G with weight function w. If G contains no perfect matching the empty<br />

set of edges is returned. <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 />

template <br />

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

const edge array& w,<br />

const list& M,<br />

const node array& pot,<br />

const array& BT ,<br />

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 iff M is a maximum-weight<br />

perfect 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!