Function

CFBinaryHeapGetMinimumIfPresent

Returns the minimum value in a binary heap, if present.

Declaration

Boolean CFBinaryHeapGetMinimumIfPresent(CFBinaryHeapRef heap, const void **value);

Parameters

heap

The binary heap to use.

value

On return, the minimum value in heap as determined by the binary heap’s compare callback. If heap contains several equal minimum values, any one may be returned. If the value is a Core Foundation object, ownership follows the The Get Rule.

Return Value

true if a minimum value exists in heap, false otherwise. false is returned only if heap is empty.

See Also

CFBinaryHeap Miscellaneous Functions

CFBinaryHeapAddValue

Adds a value to a binary heap.

CFBinaryHeapApplyFunction

Iteratively applies a function to all the values in a binary heap.

CFBinaryHeapContainsValue

Returns whether a given value is in a binary heap.

CFBinaryHeapCreate

Creates a new mutable or fixed-mutable binary heap.

CFBinaryHeapCreateCopy

Creates a new mutable or fixed-mutable binary heap with the values from a pre-existing binary heap.

CFBinaryHeapGetCount

Returns the number of values currently in a binary heap.

CFBinaryHeapGetCountOfValue

Counts the number of times a given value occurs in a binary heap.

CFBinaryHeapGetMinimum

Returns the minimum value in a binary heap.

CFBinaryHeapGetTypeID

Returns the type identifier of the CFBinaryHeap opaque type.

CFBinaryHeapGetValues

Copies all the values from a binary heap into a sorted C array.

CFBinaryHeapRemoveAllValues

Removes all values from a binary heap, making it empty.

CFBinaryHeapRemoveMinimumValue

Removes the minimum value from a binary heap.