Basic data types |
Basix defines a type nat, meaning “natural integers”, that corresponds to unsigned int within most architecture. Yet no assumption on the size of nat is made for the sake of portability.
The standard ouput stream is mmout, the standard error stream is mmerr, and the standard input is mmin.
Strings are implemented in the class string provided by string.hpp.
Memory allocation is done in a way so that you can write the following piece of code with essentially no lack of efficiency:
Lists are implemented in the template class list provided by list.hpp. Usual operations are available from list_sort.hpp.
Balanced tree are implemented in the class chain provided by chain.hpp. Usage is similar to the one of the lists.
Ordered heaps are provided by heap.hpp.
Pairs are provided by pair, and triples in triple.hpp. Tuples are provided by tuple.hpp.
Arrays are provides by vector.hpp.
For efficiency reasons, vectors are indeed parametrized by an abstration layer, that is defined in vector_naive.hpp. For instance vectors of int with fixed size 10 can be obtained as follows:
Hash tables are defined in table.hpp.
Iterators are defined in iterator.hpp.
All non-atomic structures have iterators.