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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

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

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

void S.clear( ) makes S the empty interval set.<br />

bool S.empty( ) returns true iff S is empty.<br />

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

4. Implementation<br />

Interval sets are implemented by two-dimensional range trees [90, 57]. Operations insert,<br />

lookup, del item and del take time O(log 2 n), intersection takes time O(k + log 2 n), where<br />

k is the size of the returned list. Operations left, right, inf, empty, and size take time<br />

O(1), and clear O(n log n). Here n is always the current size of the interval set. <strong>The</strong> space<br />

requirement is O(n log n).

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

Saved successfully!

Ooh no, something went wrong!