Heap::parentIndex

(Available since version 1.0)

Heap::parentIndexReturns the index of the parent

Description

protected int Heap::parentIndex ( int $index )

Returns the index of the parent of the node referred to by the index, index, in the binary tree.

Parameters

index

The index to be queried.

Return Values

The index of the parent or NULL if none exists.

To Top