      library
      Copyright (c)  2007 Anna Bigatti
      GNU Free Documentation License, Version 1.2
%!includeconf: ../aux-txt2tags/config.t2t
      TeXTitle{library}{Anna Bigatti}



== User documentation for file library.H ==
%======================================================================

library.H is generated by running ``make`` in the ``include/CoCoA/``
directory (which is also called by the general ``make`` in the CoCoALib
directory).

It includes all the .H files of CoCoALib, so, copying the lines
```
  #include "CoCoA/library.H"
  using namespace CoCoA;
```
is the easiest way to use it (see the examples directory)

When you include ``library.H`` you are also guaranteed to include
```
  #include <algorithm>// using std::transform; from apply.H
  #include <bitset>   // using std::bitset;    from DivMask.H
  #include <cstddef>  // using std::size_t;    from MemPool.H and BigInt.H
  #include <exception>// using std::exception; from error.H
  #include <gmp.h>    //                       from BigInt.H
  #include <iosfwd>   // using std::ostream;   from PPOrdering.H and BigInt.H
  #include <iostream> // using std::istream; using std::ostream;  from io.H
  #include <list>     // using std::list;      from QBGenerator.H and io.H
  #include <memory>   // using std::auto_ptr;  from MemPool.H
  #include <string>   // using std::string;    from MemPool.H and symbol.H
  #include <vector>   // using std::vector;    from DenseMatrix.H and io.H
```
For maintenance purposes we list the most stable files including them.
This list is probably not complete, but should be pretty reliable in
the years to come.

== Common includes ==
To ensure portability you should specify what you use and where it is
defined.  Moreover you should not have a ``using`` in a ``.H`` file.

Here is a list of the most common includes, for more details look at
Jossutis //C++ Standard Library//.
```
#include <algorithm>
using std::back_inserter;
using std::copy;
using std::count_if;
using std::fill;
using std::find;
using std::find_if;
using std::for_each;
using std::max;
using std::min;
using std::sort;
using std::stable_sort;
using std::swap;
```
```
#include <list>
using std::list;
```
```
#include <cstddef>
using std::size_t;
```
```
#include <cstdlib>
using std::abs;
using std::size_t;
```
```
#include <cstring>
using std::memcpy;
```
```
#include <functional>
using std::binary_function;
using std::bind1st;
using std::bind2nd;
using std::less;
using std::mem_fun_ref; // for calling GPair::complete on GPairList
```
```
#include <iostream>
using std::endl;
using std::flush;
using std::ostream;
```
```
#include <iterator>
```
```
#include <limits>
using std::numeric_limits;
```
```
#include <memory>
using std::auto_ptr;
```
```
#include <new>
// for placement new
```
```
#include <set>
using std::set;
```
```
#include <string>
using std::string;
```
```
#include <utility>
using std::make_pair;
```
```
#include <vector>
using std::vector;
```
