/[zanavi_public1]/navit/navit/fib-1.1/fh_makekeyheap.3
ZANavi

Contents of /navit/navit/fib-1.1/fh_makekeyheap.3

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 28 21:19:04 2011 UTC (12 years, 5 months ago) by zoff99
File size: 1984 byte(s)
import files
1 .TH FH_MAKEKEYHEAP 3 "29 Mar 2000" "libfib"
2 .SH NAME
3 fh_makekeyheap \- make a Fibonacci key Heap
4 .SH SYNOPSIS
5 #include <fib.h>
6 .PP
7 struct fibheap *
8 .PD 0
9 .HP 8
10 .BR fh_makekeyheap (void)
11 .PD
12 .PP
13 struct fibheap_el *
14 .PD 0
15 .HP 8
16 .BR fh_insertkey "(struct fibheap *heap, int key, void *data)"
17 .PD
18 .PP
19 int
20 .PD 0
21 .HP 8
22 .BR fh_minkey "(struct fibheap *heap)"
23 .PD
24 .PP
25 void *
26 .PD 0
27 .HP 8
28 .BR fh_replacekey "(struct fibheap *heap, struct fibheap_el *elem, int key)"
29 .PD
30 .PP
31 void *
32 .PD 0
33 .HP 8
34 .BR fh_replacekeydata "(struct fibheap *heap, struct fibheap_el *elem, int key, void *data)"
35 .PD
36 .SH DESCRIPTION
37 The
38 .B fh_makekeyheap
39 function makes a Fibonacci heap which does ordering based on an
40 integer key that is given in addition to the data.
41 This menthod is useful so that you can eliminate the need to call
42 a comparision function to order the data in the heap.
43 .PP
44 The pointer to the structure
45 .B fibheap
46 returned by
47 .B fh_makekeyheap
48 is an opaque structure. The the pointer can only be passed to other
49 functions in the
50 .B libfib
51 library.
52 .PP
53 The
54 .B fh_insertkey
55 function inserts the
56 .B data
57 element into the heap with a value of
58 .BR key .
59 The pointer returned can be used in calls to functions like
60 .BR fh_delete (3)
61 to delete the key from the heap before it gets extracted via
62 .BR fh_extractmin (3).
63 .SH RETURN VALUES
64 The
65 .B fh_makekeyheap
66 function returns a pointer to a heap structure used to insert and extract
67 data elements.
68 .PP
69 The
70 .B fh_insertkey
71 functions returns a pointer to a heap element structure which can be used
72 to manimulate that data element in the heap.
73 .PP
74 The
75 .B fh_minkey
76 function returns the integer key of the data at the top of the heap. If you would like to view the data, see
77 .BR fh_min (3).
78 .SH SEE ALSO
79 .BR fh_extractmin (3)
80 .SH AUTHORS
81 This library and man page was writen by John-Mark Gurney <gurney_j@efn.org>.
82 .SH BUGS
83 A key heap does not provide a way for handling key collitions and deffering
84 decission to a user provided function to resolve colissions.

   
Visit the ZANavi Wiki