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.

p dictionary D.change inf(p dic item it, const I& i)<br />

int D.size( ) returns the size of D.<br />

returns D.del item(it) ∪ {〈k, i〉}, where k =<br />

key(it).<br />

Precondition: it ∈ D.<br />

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

4. Implementation<br />

Persistent dictionaries are implemented by leaf oriented persistent red black trees. Operations<br />

insert, lookup, del item, del take time O(log 2 n), key, inf, empty, size and change inf<br />

take time O(1). <strong>The</strong> space requirement is O(1) for each update operation.

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

Saved successfully!

Ooh no, something went wrong!