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.

ool A.empty( ) returns true if A is empty, false otherwise.<br />

void A.set default value(const E& x)<br />

sets xdef to x.<br />

Iteration<br />

forall defined(i, A) { “the elements from dom(A) are successively assigned to i” }<br />

Remark: the current element may not be deleted resp. declared undefined during execution<br />

of the loop.<br />

forall(x, A) { “for all i ∈ dom(A) the entries A[i] are successively assigned to x” }.<br />

4. Implementation<br />

Hashing arrays are implemented by hashing with chaining. Access operations take expected<br />

time O(1). In many cases, hashing arrays are more efficient than dictionary arrays<br />

(cf. 7.2).

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

Saved successfully!

Ooh no, something went wrong!