> <\body> Basix defines a type |mmx::nat>, meaning ``natural integers'', that corresponds to within most architecture. Yet no assumption on the size of is made for the sake of portability. The standard ouput stream is |mmx::mmout>, the standard error stream is |mmx::mmerr>, and the standard input is |mmx::mmin>. Strings are implemented in the class |mmx::string> provided by |basix/string.hpp>. <\cpp-code> string s = "Hello"; mmout \\ s \\ "\\n"; Memory allocation is done in a way so that you can write the following piece of code with essentially no lack of efficiency: <\cpp-code> // Remove all \\ in s string foo (const string& s) { \ \ nat i, n= N(s); \ \ string r; \ \ for (i=0; i \ n; i++) \ \ \ \ if (s[i] != '\\') r \\ s[i]; \ \ return r; } \; Lists are implemented in the template class |mmx::list> provided by |basix/list.hpp>. Usual operations are available from |basix/list_sort.hpp>. <\cpp-code> list\int\ x (1, 2, 3); list\int\ y (seq (1, 5)); mmout \\ "x n= " \\ x \\ "\\n"; mmout \\ "y = " \\ y \\ "\\n"; mmout \\ "x*y = " \\ (x*y) \\ "\\n"; mmout \\ "x==y = " \\ (x==y) \\ "\\n"; mmout \\ "x!=y = " \\ (x!=y) \\ "\\n"; mmout \\ "x... = " \\ iterate (x) \\ "\\n"; Balanced tree are implemented in the class |mmx::chain> provided by |basix/chain.hpp>. Usage is similar to the one of the lists. Ordered heaps are provided by |basix/heap.hpp>. Pairs are provided by |basix/pair.hpp>, and triples in |basix/triple.hpp>. Tuples are provided by |basix/tuple.hpp>. Arrays are provides by |basix/vector.hpp>. <\cpp-code> #define C double vector\C\ u = vec (C (5), C (7), C (9)); vector\C\ v = vec (C (2), C (3), C (5)); mmout \\ "u = " \\ u \\ "\\n"; mmout \\ "v = " \\ v \\ "\\n"; v *= u; For efficiency reasons, vectors are indeed parametrized by an abstration layer, that is defined in |basix/vector_naive.hpp>. For instance vectors of with fixed size 10 can be obtained as follows: <\cpp-code> vector\C, vector_fixed\vector_naive, fixed_value\nat,10\ \ x (3); Hash tables are defined in |basix/table.hpp>. <\cpp-code> pair\int,int\ x1 (1, 2), x2 (7, 7); table\int,int\ t (seq (x1, x2)); table\int,int\ u (0); u[1]= 8; u[2]= 7; u[3]= 6; u[4]= 5; mmout \\ "t = " \\ t \\ "\\n"; mmout \\ "u = " \\ u \\ "\\n"; reset (u, 3); Iterators are defined in |basix/iterator.hpp>. <\cpp-code> iterator\int\ it1; mmout \\ "it1 = " \\ it1 \\ "\\n"; iterator\int\ it2 = seq (1, 2, 3); mmout \\ "it2 = " \\ it2 \\ "\\n"; iterator\int\ it3 = range_iterator\int\ (0, 100); \; list\string\ l ("a", "b"); iterator\string\ it; for (it = iterate (l); busy (it); ++it) \ \ mmout \\ *it \\ "\\n"; All non-atomic structures have iterators. . If you don't have this file, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.> <\initial> <\collection>