]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/README.md
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / math / README.md
CommitLineData
92f5a8d4
TL
1Boost Math Library [![Build Status](https://travis-ci.org/boostorg/math.svg?branch=develop)](https://travis-ci.org/boostorg/math)
2==================
3
20effc67
TL
4>ANNOUNCEMENT: Support for C++03 is now deprecated in this library and will be supported in existing features
5>only until March 2021. New features will require *at least* C++11, as will existing features from next year.
6
92f5a8d4
TL
7This library is divided into several interconnected parts:
8
9### Floating Point Utilities
10
11Utility functions for dealing with floating point arithmetic, includes functions for floating point classification (fpclassify, isnan, isinf etc), sign manipulation, rounding, comparison, and computing the distance between floating point numbers.
12
13### Specific Width Floating Point Types
14
20effc67 15A set of typedefs similar to those provided by `<cstdint>` but for floating point types.
92f5a8d4
TL
16
17### Mathematical Constants
18
19A wide range of constants ranging from various multiples of π, fractions, Euler's constant, etc.
20
21These are of course usable from template code, or as non-templates with a simplified interface if that is more appropriate.
22
23### Statistical Distributions
24
25Provides a reasonably comprehensive set of statistical distributions, upon which higher level statistical tests can be built.
26
27The initial focus is on the central univariate distributions. Both continuous (like normal & Fisher) and discrete (like binomial & Poisson) distributions are provided.
28
29A comprehensive tutorial is provided, along with a series of worked examples illustrating how the library is used to conduct statistical tests.
30
31### Special Functions
32
33Provides a small number of high quality special functions; initially these were concentrated on functions used in statistical applications along with those in the Technical Report on C++ Library Extensions.
34
f67539c2 35The function families currently implemented are the gamma, beta & error functions along with the incomplete gamma and beta functions (four variants of each) and all the possible inverses of these, plus the digamma, various factorial functions, Bessel functions, elliptic integrals, hypergeometrics, sinus cardinals (along with their hyperbolic variants), inverse hyperbolic functions, Legrendre/Laguerre/Hermite/Chebyshev polynomials and various special power and logarithmic functions.
92f5a8d4
TL
36
37All the implementations are fully generic and support the use of arbitrary "real-number" types, including Boost.Multiprecision, although they are optimised for use with types with known significand (or mantissa) sizes: typically float, double or long double.
38
39These functions also provide the basis of support for the TR1 special functions.
40
41### Root Finding and Function Minimisation
42
43A comprehensive set of root-finding algorithms over the real line, both with derivatives and derivative free.
44
45Also function minimisation via Brent's Method.
46
47### Polynomials and Rational Functions
48
49Tools for manipulating polynomials and for efficient evaluation of rationals or polynomials.
50
51### Interpolation
52
f67539c2 53Function interpolation via barycentric rational interpolation, compactly supported quadartic, cubic, and quintic B-splines, the Chebyshev transform, trigonometric polynomials, Makima, pchip, and cubic Hermite splines.
92f5a8d4
TL
54
55### Numerical Integration and Differentiation
56
f67539c2 57A reasonably comprehensive set of routines for integration (trapezoidal, Gauss-Legendre, Gauss-Kronrod, Gauss-Chebyshev, double-exponential, and Monte-Carlo) and differentiation (Chebyshev transform, finite difference, the complex step derivative, and forward-mode automatic differentiation).
92f5a8d4
TL
58
59The integration routines are usable for functions returning complex results - and hence can be used for computation of contour integrals.
60
61### Quaternions and Octonions
62
20effc67 63Quaternion and Octonians are class templates similar to std::complex.
92f5a8d4
TL
64
65The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/math).
66
67| | Master | Develop |
68|------------------|----------|-------------|
69| Travis | [![Build Status](https://travis-ci.org/boostorg/math.svg?branch=master)](https://travis-ci.org/boostorg/math) | [![Build Status](https://travis-ci.org/boostorg/math.svg)](https://travis-ci.org/boostorg/math) |
70| Appveyor | [![Build status](https://ci.appveyor.com/api/projects/status/cnugjx9dt7cou7nj/branch/master?svg=true)](https://ci.appveyor.com/project/jzmaddock/math/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/cnugjx9dt7cou7nj/branch/develop?svg=true)](https://ci.appveyor.com/project/jzmaddock/math/branch/develop) |
71
72
73
74## Support, bugs and feature requests ##
75
f67539c2 76Bugs and feature requests can be reported through the [GitHub issue tracker](https://github.com/boostorg/math/issues)
92f5a8d4
TL
77(see [open issues](https://github.com/boostorg/math/issues) and
78[closed issues](https://github.com/boostorg/math/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed)).
79
80You can submit your changes through a [pull request](https://github.com/boostorg/math/pulls).
81
82There is no mailing-list specific to Boost Math, although you can use the general-purpose Boost [mailing-list](http://lists.boost.org/mailman/listinfo.cgi/boost-users) using the tag [math].
83
84
85## Development ##
86
87Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
88
89 $ git clone https://github.com/boostorg/boost
90 $ cd boost
91 $ git submodule update --init
92
93The Boost Math Library is located in `libs/math/`.
94
95### Running tests ###
96First, make sure you are in `libs/math/test`.
97You can either run all the tests listed in `Jamfile.v2` or run a single test:
98
99 test$ ../../../b2 <- run all tests
100 test$ ../../../b2 static_assert_test <- single test
101 test$ # A more advanced syntax, demoing various options for building the tests:
102 test$ ../../../b2 -a -j2 -q --reconfigure toolset=clang cxxflags="--std=c++14 -fsanitize=address -fsanitize=undefined" linkflags="-fsanitize=undefined -fsanitize=address"
103
104### Building documentation ###
105
106Full instructions can be found [here](https://svn.boost.org/trac10/wiki/BoostDocs/GettingStarted), but to reiterate slightly:
107
108```bash
109libs/math/doc$ brew install docbook-xsl # on mac
110libs/math/doc$ touch ~/user-config.jam
111libs/math/doc$ # now edit so that:
112libs/math/doc$ cat ~/user-config.jam
113using darwin ;
114
115using xsltproc ;
116
117using boostbook
118 : /usr/local/opt/docbook-xsl/docbook-xsl
119 ;
120
121using doxygen ;
122using quickbook ;
123libs/math/doc$ ../../../b2
124```