Naming conventions and file structure

The functions defined in the library synaps are available from the namespace SYNAPS. Each file contains the following include directive:

#include <synaps/init.h>

where the macros __SYNAPS_BEGIN_NAMESPACE and __SYNAPS_END_NAMESPACE are defined. These macros appear around the definition of any function of the library, in order to enclose this definition in the namespace SYNAPS.

In order to use the functions and classes of the library, you can either use the directive

using namespace SYNAPS;

or define at the beginning of the main file the macro:

#define USING_NAMESPACE_SYNAPS 1

before including any other file of the library.

Types

Hereafter, we will use _t to precise that we are defining a type name:

typedef a_class<double> adbl_t;

Global functions and classes

The name of a global class of the namespace SYNAPS starts with a upper case letter, whereas functions are with lower case letters:

solve(p, Aberth<RR>());

If the name is composite, we use several upper case letters: MatrDse, DegLex, ... The names of the containers are in lower case letters.

Modules

The name of a module is with upper case letters: MPOLDST, VECTOR, ...

SYNAPS DOCUMENTATION
logo