Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Namespaces

All math functions and distributions are in namespace boost::math.

So, for example, the Students-t distribution template in namespace boost::math is

template <class RealType> class students_t_distribution

and can be instantiated with the help of the reserved name students_t(for RealType double)

typedef students_t_distribution<double> students_t;

student_t mydist(10);
[Warning] Warning

Some distribution names are also used in std random library, so to avoid the risk of ambiguity it is better to make explicit using declarations, for example: using boost::math::students_t_distribution

Functions not intended for use by applications are in boost::math::detail.

Functions that may have more general use, like digits (significand), max_value, min_value and epsilon are in boost::math::tools.

Policy and configuration information is in namespace boost::math::policies.

[Tip] Tip

Many code snippets assume implicit namespace(s), for example, std:: or boost::math.

[Tip] Tip

Start your work from a copy of the example source code; links usually provided.


PrevUpHomeNext