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.

void CreateInputGraph(graph& G, list& A, list& B,<br />

node map& nodes a, node map& nodes b,<br />

const list& InputA, const list& InputB,<br />

const map& preferencesA,<br />

const map& preferencesB)<br />

<strong>The</strong> function takes a list of objects InputA and a<br />

list of objects InputB. <strong>The</strong> objects are represented<br />

bei integer numbers, multiple occurences of the same<br />

number in the same list are ignored. <strong>The</strong> maps<br />

preferencesA and preferencesB give for each object<br />

i the list of partner candidates with respect to<br />

a matching. <strong>The</strong> lists are decreasingly ordered according<br />

to the preferences. <strong>The</strong> function computes<br />

the input data G, A and B for calling the function<br />

StableMatching(constgraph&, ...). <strong>The</strong> maps<br />

nodes a and nodes b provide the objects in A and B<br />

corresponding to the nodes in the graph.<br />

Precondition: <strong>The</strong> entries in the lists in the preference<br />

maps only contain elements from InputB resp.<br />

InputA.<br />

<strong>The</strong>re are no multiple occurences of an element in the<br />

same such list.

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

Saved successfully!

Ooh no, something went wrong!