/** @name A: Introduction PBL is an GPL open source C library of functions that can be used in a C or C++ project. PBL is highly portable and compiles warning free on Linux gcc, MAC OS X and Windows Microsoft Visual C++ 2010 Express Edition.
Version 1.01, Fri Nov 1 2002 - Improved memory management, see pblkf.c Revision 1.2, 1.3
Version 1.02, Mit Feb 19 2003 - Fixed a bug reported by Csaba Pálos, see pblisam.c Revision 1.2
Version 1.03, Sun Apr 4 2004 - Fixed a bug reported by Jari Aalto, see pbl.h Revision 1.3
Version 1.04, Sun Mar 1 2009 - Optimizations during MAC OS X port. Exposed the array list, linked list, tree set and hash set functions.
Version 1.04.02, Sun May 30 2010 - Exposed the map interface functions.
Version 1.04.03, Sun Aug 8 2010 - Exposed the priority queue functions.
Version 1.04.04, Sun Sep 5 2010 - Exposed the heap functions.
PBL BASE - Some base functions, see pbl_* functions.
PBL COLLECTION - An open source C implementation of a collection used by the list and set implementations.
PBL LIST - An open source C implementation of array lists and linked lists similar to the Java List interface, see pblList* functions,
The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant factor is low compared to that for the LinkedList implementation.
Each pblArrayList instance has a capacity. The capacity is the size of the array used to store the elements in the list. It is always at least as large as the list size. As elements are added to an ArrayList, its capacity grows automatically. The details of the growth policy are not specified beyond the fact that adding an element has constant amortized time cost.
An application can increase the capacity of an ArrayList instance before adding a large number of elements using the ensureCapacity operation. This may reduce the amount of incremental reallocation.
The module implements the Queue operations, providing first-in-first-out queue operations for add, poll, etc. Other stack and deque operations could be easily recast in terms of the standard list operations.
All of the operations perform as could be expected for a doubly-linked list. Operations that index into the list will traverse the list from the beginning or the end, whichever is closer to the specified index.
An iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator's current position in the list. A ListIterator has no current element; its cursor position always lies between the element that would be returned by a call to previous() and the element that would be returned by a call to next(). In a list of length n, there are n+1 valid index values, from 0 to n, inclusive.
Note that the remove() and set(Object) methods are not defined in terms of the cursor position; they are defined to operate on the last element returned by a call to next() or previous().
PBL Set - An open source C implementation of hash sets and tree sets similar to the Java Set interface, see pblSet* functions,
Open source C avl-tree-based balanced tree set implementation equivalent to the
Java TreeSet
class.
Tree sets guarantees that the sorted set will be in ascending element order,
sorted according to the natural order of the elements,
or by the comparator provided.
This implementation provides guaranteed log(n) time cost for the basic operations
(add, remove and contains).
PBL Map - An open source C implementation of hash maps and tree maps similar to the Java Map interface, see pblMap* functions,
Open source C avl-tree-based balanced tree map implementation equivalent to the
Java TreeMap
class.
Tree maps guarantee that the sorted map will be in ascending element order,
sorted according to the natural order of the elements,
or by the comparator provided.
This implementation provides guaranteed log(n) time cost for the basic operations
(add, remove and contains).
PBL HEAP -- Heap in C, C heap, heap in C, C-Heap, binary heap in C, binary min-max heap in C
This heap orders elements according to a compare function specified. A heap does not permit null elements.
PBL PRIORITY QUEUE -- PriorityQueue in C, C priority queue, priority queue in C, Heap in C, C-Heap, binary heap in C, binary max heap in C
PBL HASH - An open source C memory hash table implementation, see pblHt* functions,