• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..11-Apr-2013244

ChangesH A D20-Feb-20131.9 KiB

lib/H11-Apr-20134

Makefile.PLH A D20-Feb-2013301

MANIFESTH A D20-Feb-2013490

META.ymlH A D20-Feb-2013332

READMEH A D20-Feb-20131.6 KiB

t/H11-Apr-201315

TODOH A D20-Feb-2013184

README

1Heap routines...
2
3This is a collection of routines for managing a heap data structure.
4
5There are two major components: a heap component, and an element
6component.
7
8A heap package basically keeps a collection of elements and is
9able to return the smallest one.
10
11The heap component interface is defined in Heap(3) and must be
12supported by all heap packages.  Currently there are three heap
13components provided:
14
15    Heap::Fibonacci  (the preferred one)
16    Heap::Binomial
17    Heap::Binary
18
19See the book "Algorithms" by Cormen, Leiserson, and Rivest for
20details of the three heap packages.
21
22The element package wraps the data that is to be stored and retrieved
23on the heap.  You can inherit from the Heap::Elem object to embed
24element capability into your own objects, or you can use the provided
25objects to embed your data into elements without having to
26specifically design your dat for that purpose.  The Heap::Elem(3)
27module provides a detailed description of the requirements of an
28element module.  (The main ones are that it must provide a cmp method
29so that the elements can be ordered, and it must provide a heap
30method that will either store or retrieve a scalar value so that the
31heap routines can map an element reference into its position within
32the heap.
33
34Version 0.70 was used for the graph routines in the book "Mastering
35Algorithms with Perl", and there has been some feedback from users,
36which indicates that it is not too rough around the edges.
37
38Comments to:
39
40    John Macdonald <john@perlwolf.com>
41
42Copyright:
43
44    This code is copyright 1998-2007 O'Reilly & Associates.  It is
45    available on the same terms as perl itself.
46