With the completion of the macro processor , I can start on the design of my macro library. The macro library has a number of container classes that are required by my project. My design goals are for the library to be fast, general purpose, and easy to use.
The library consists of the following classes: Pair, Array, Single Linked List, Double Linked List, and Map.
Please send bug reports or comments to my e-mail address listed at the end of the page.
A Pair is a structure of two items of type $T1 and $T2.
The Array is an expandable array of type $T. One can dynamically add or remove from the end of the array.
The single linked list is a structure carrying a data item of type $T, in addition to the next pointer.
The double linked list has two parts: the double linked node, and the double linked list.
The double linked node is a structure carrying a data item of type $T, in addition to the previous and next pointer.
The double linked list consisted of a sequence of double linked nodes. The nodes can be inserted or removed from the two ends of the list. There is an operation to tell if a node is currently in a list.
The Map provides quick lookup capability mapping from a key to a value. Its implementation uses the Sorted Linear Hash Table algorithm.