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.

const P & Q.inf(node v) returns the priority of node v.<br />

4. Implementation<br />

Node priority queues are implemented by binary heaps and node arrays. Operations<br />

insert, del node, del min, decrease p take time O(log m), find min and empty take time<br />

O(1) and clear takes time O(m), where m is the size of Q. <strong>The</strong> space requirement is O(n),<br />

where n is the number of nodes of G.

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

Saved successfully!

Ooh no, something went wrong!