Heap::update

(Available since version 1.0)

Heap::updateUpdates a node in the heap to a new value

Description

abstract public void Heap::update ( mixed $value1 , mixed $value2 )

Updates a node in the heap from its current value to a new value, value2. Where the current value is given by executing Heap::value() on value1.

If two nodes in the heap have the same value then only one will be changed.

Parameters

value1

The current value.

value2

The new value.

Return Values

No value is returned.

Errors/Exceptions

Throws SEIDS::Heaps::UpdateException when value1 is not in the heap.

To Top