1 |
.TH FH_EXTRACTMIN 3 "29 Mar 2000" "libfib"
|
2 |
.SH NAME
|
3 |
fh_extractmin \- extract minimum element from a Fibonacci Heap
|
4 |
.SH SYNOPSIS
|
5 |
#include <fib.h>
|
6 |
.PP
|
7 |
void *
|
8 |
.PD 0
|
9 |
.HP 8
|
10 |
.BR fh_extractmin "(struct fibheap *heap)"
|
11 |
.PD
|
12 |
.PP
|
13 |
void *
|
14 |
.PD 0
|
15 |
.HP 8
|
16 |
.BR fh_min "(struct fibheap *heap)"
|
17 |
.PD
|
18 |
.PP
|
19 |
void *
|
20 |
.PD 0
|
21 |
.HP 8
|
22 |
.BR fh_replacedata "(struct fibheap *heap, struct fibheap_el *elem, void *data)"
|
23 |
.PD
|
24 |
.PP
|
25 |
void *
|
26 |
.PD 0
|
27 |
.HP 8
|
28 |
.BR fh_delete "(struct fibheap *heap, struct fibheap_el *elem)"
|
29 |
.PD
|
30 |
.PP
|
31 |
void
|
32 |
.PD 0
|
33 |
.HP 8
|
34 |
.BR fh_deleteheap "(struct fibheap *heap)"
|
35 |
.PD
|
36 |
.PP
|
37 |
struct fibheap *
|
38 |
.PD 0
|
39 |
.HP 8
|
40 |
.BR fh_union "(struct fibheap *heapa, struct fibheap *heapb)"
|
41 |
.PD
|
42 |
.SH DESCRIPTION
|
43 |
These functions are shared between both key heaps and normal heaps.
|
44 |
.PP
|
45 |
Once a
|
46 |
.B elem
|
47 |
pointer has been passed to
|
48 |
.BR fh_delete (3)
|
49 |
that
|
50 |
.B elem
|
51 |
pointer may be reused to store another datum.
|
52 |
You should make sure that you destroy any copies of the pointer.
|
53 |
.SH RETURN VALUES
|
54 |
The
|
55 |
.B fh_extractmin
|
56 |
function returns the value of
|
57 |
.B data
|
58 |
that is the minimum element and removes it from the heap.
|
59 |
.PP
|
60 |
The
|
61 |
.B fh_min
|
62 |
function returns the current minimum element but does
|
63 |
.I not
|
64 |
remove it from the heap.
|
65 |
.PP
|
66 |
The
|
67 |
.B fh_replacedata
|
68 |
replaces the data in
|
69 |
.B elem
|
70 |
and returns the old data.
|
71 |
.PP
|
72 |
The
|
73 |
.B fh_delete
|
74 |
function removes
|
75 |
.B elem
|
76 |
from the heap, and returns the
|
77 |
.B data
|
78 |
that was stored in the element.
|
79 |
.PP
|
80 |
The
|
81 |
.B fh_deleteheap
|
82 |
complete destroys the heap. It does not free any user supplied
|
83 |
.B data
|
84 |
elements stored in the heap.
|
85 |
.PP
|
86 |
The
|
87 |
.B fh_union
|
88 |
function returns the union of the two heaps
|
89 |
.B heapa
|
90 |
and
|
91 |
.BR heapb .
|
92 |
.SH SEE ALSO
|
93 |
.BR fh_makeheap (3),
|
94 |
.BR fh_makekeyheap (3)
|
95 |
.SH AUTHORS
|
96 |
This library and man page was writen by John-Mark Gurney <gurney_j@efn.org>.
|
97 |
.SH BUGS
|