Appendix: Fundamental data structures
In several algorithms we have used fundamental data structures such as vectors and queues. I trust the reader to be familiar with these data structures, and rather than describing their implementation in the middle of the description of an algorithm, I have moved them to this appendix and made references to them when we encountered them the first time. We have needed some of the data structures for more than one type of elements, for example, a vector of strings and indices and a queue of pointers and indices. To avoid duplicated code, I have used a combination of functions and macros. Most of the smaller functions are most appropriately implemented as inline functions, so the compiler can optimize them. I ...