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.

const I& D.inf(dic2 item it) returns the information of item it.<br />

Precondition: it is an item in D.<br />

I& D[dic2 item it] returns a reference to the information of item<br />

it.<br />

Precondition: it is an item in D.<br />

dic2 item D.min key1( ) returns the item with minimal first key.<br />

dic2 item D.min key2( ) returns the item with minimal second key.<br />

dic2 item D.max key1( ) returns the item with maximal first key.<br />

dic2 item D.max key2( ) returns the item with maximal second key.<br />

dic2 item D.insert(const K1 & x, const K2 & y, const I& i)<br />

dic2 item D.lookup(const K1 & x, const K2 & y)<br />

associates the information i with the keys x<br />

and y. If there is an item in D then<br />

j is replaced by i, else a new item <br />

is added to D. In both cases the item is returned.<br />

returns the item with keys x and y (nil if no<br />

such item exists in D).<br />

list D.range search(const K1 & x0 , const K1 & x1 , const K2 & y0 ,<br />

const K2 & y1 )<br />

returns the list of all items in D<br />

with x 0 ≤ k 1 ≤ x 1 and y 0 ≤ k 2 ≤ y 1 .<br />

list D.all items( ) returns the list of all items of D.<br />

void D.del(const K1 & x, const K2 & y)<br />

deletes the item with keys x and y from D.<br />

void D.del item(dic2 item it) removes item it from D.<br />

Precondition: it is an item in D.<br />

void D.change inf(dic2 item it, const I& i)<br />

makes i the information of item it.<br />

Precondition: it is an item in D.<br />

void D.clear( ) makes D the empty d2 dictionary.<br />

bool D.empty( ) returns true if D is empty, false otherwise.<br />

int D.size( ) returns the size of D.

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

Saved successfully!

Ooh no, something went wrong!