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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

in general graph.<br />

You may skip the following subsections and restrict on reading the function signatures<br />

and the corresponding comments in order to use these functions. If you are interested in<br />

technical details, or if you would like to ensure that the input data is well chosen, or if<br />

you would like to know the exact meaning of all output parameters, you should continue<br />

reading.<br />

<strong>The</strong> functions in this section are template functions. It is intended that in the near<br />

future the template parameter NT can be instantiated with any number type. Please<br />

note that for the time being the template functions are only guaranteed to<br />

perform correctly for the number type int. In order to use the template version of<br />

the function the appropriate .h-file must be included.<br />

#include <br />

<strong>The</strong>re are pre-instantiations for the number types int. In order to use them either<br />

#include <br />

or<br />

#include <br />

has to be included (the latter file includes the former). <strong>The</strong> connection between template<br />

functions and pre-instantiated functions is discussed in detail in the section “Templates<br />

for Network Algorithms” of the <strong>LEDA</strong> book. <strong>The</strong> function names of the pre-instantiated<br />

versions and the template versions only differ by an additional suffix _T in the names of<br />

the latter ones.<br />

Proof of Optimality. Most of the functions for computing maximum or minimum<br />

weighted matchings provide a proof of optimality in the form of a dual solution represented<br />

by pot, BT and b. We briefly discuss their semantics: Each node is associated with a<br />

potential which is stored in the node array pot. <strong>The</strong> array BT (type array) is used to represent the nested family of odd cardinality sets which is constructed<br />

during the course of the algorithm. For each (non-trivial) blossom B, a two tuple (z B , p B )<br />

is stored in BT, where z B is the potential and p B is the parent index of B. <strong>The</strong> parent<br />

index p B is set to −1 if B is a surface blossom. Otherwise, p B stores the index of the<br />

entry in BT corresponding to the immediate super-blossom of B. <strong>The</strong> index range of<br />

BT is [0, . . . , k − 1], where k denotes the number of (non-trivial) blossoms. Let B ′ be a<br />

sub-blossom of B and let the corresponding index of B ′ and B in BT be denoted by i ′<br />

and i, respectively. <strong>The</strong>n, i ′ < i. In b (type node array) the parent index for each<br />

node u is stored (−1 if u is not contained in any blossom).

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

Saved successfully!

Ooh no, something went wrong!