FH_EXTRACTMIN(3)

NAME
fh_extractmin - extract minimum element from a Fibonacci Heap

SYNOPSIS
#include <fib.h>

void *
fh_extractmin(struct fibheap *heap)

void *
fh_min(struct fibheap *heap)

void *
fh_replacedata(struct fibheap *heap, struct fibheap_el *elem, void *data)

void *
fh_delete(struct fibheap *heap, struct fibheap_el *elem)

void
fh_deleteheap(struct fibheap *heap)

struct fibheap *
fh_union(struct fibheap *heapa, struct fibheap *heapb)

DESCRIPTION
These functions are shared between both key heaps and normal heaps.

Once a elem pointer has been passed to fh_delete(3) that elem pointer may be reused to store another datum. You should make sure that you destroy any copies of the pointer.

RETURN VALUES
The fh_extractmin function returns the value of data that is the minimum element and removes it from the heap.

The fh_min function returns the current minimum element but does not remove it from the heap.

The fh_replacedata replaces the data in elem and returns the old data.

The fh_delete function removes elem from the heap, and returns the data that was stored in the element.

The fh_deleteheap complete destroys the heap. It does not free any user supplied data elements stored in the heap.

The fh_union function returns the union of the two heaps heapa and heapb.

SEE ALSO
fh_makeheap(3), fh_makekeyheap(3)

AUTHORS
This library and man page was writen by John-Mark Gurney <gurney_j@efn.org>.

BUGS