mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
372 lines
16 KiB
HTML
372 lines
16 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>Boost.Math</title>
|
|
<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
|
<link rel="start" href="index.html" title="Boost.Math">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table cellpadding="2" width="100%"><tr>
|
|
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
|
|
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
|
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
|
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
|
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
|
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav"></div>
|
|
<div class="article" lang="en">
|
|
<div class="titlepage">
|
|
<div>
|
|
<div><h2 class="title">
|
|
<a name="boost_math"></a>Boost.Math</h2></div>
|
|
<div><div class="legalnotice">
|
|
<a name="id437518"></a><p>
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
|
</p>
|
|
</div></div>
|
|
</div>
|
|
<hr>
|
|
</div>
|
|
<p>
|
|
The following mathematical libraries are present in Boost:
|
|
</p>
|
|
<div class="informaltable"><table class="table">
|
|
<colgroup>
|
|
<col>
|
|
<col>
|
|
</colgroup>
|
|
<thead><tr>
|
|
<th>
|
|
<p>
|
|
Library
|
|
</p>
|
|
</th>
|
|
<th>
|
|
<p>
|
|
Description
|
|
</p>
|
|
</th>
|
|
</tr></thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../complex/html/index.html" target="_top">Complex Number Inverse Trigonometric
|
|
Functions</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
These complex number algorithms are the inverses of trigonometric functions
|
|
currently present in the C++ standard. Equivalents to these functions
|
|
are part of the C99 standard, and will be part of the forthcoming Technical
|
|
Report on C++ Standard Library Extensions.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../gcd/html/index.html" target="_top">Greatest Common Divisor and Least
|
|
Common Multiple</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The class and function templates in <boost/math/common_factor.hpp>
|
|
provide run-time and compile-time evaluation of the greatest common divisor
|
|
(GCD) or least common multiple (LCM) of two integers. These facilities
|
|
are useful for many numeric-oriented generic programming problems.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../../../integer/index.html" target="_top">Integer</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Headers to ease dealing with integral types.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../../../numeric/interval/doc/interval.htm" target="_top">Interval</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
As implied by its name, this library is intended to help manipulating
|
|
mathematical intervals. It consists of a single header <boost/numeric/interval.hpp>
|
|
and principally a type which can be used as interval<T>.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../../../multi_array/doc/index.html" target="_top">Multi Array</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Boost.MultiArray provides a generic N-dimensional array concept definition
|
|
and common implementations of that interface.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../../../numeric/conversion/doc/index.html" target="_top">Numeric.Conversion</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The Boost Numeric Conversion library is a collection of tools to describe
|
|
and perform conversions between values of different numeric types.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../octonion/html/index.html" target="_top">Octonions</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Octonions, like <a href="../../quaternions/html/index.html" target="_top">quaternions</a>,
|
|
are a relative of complex numbers.
|
|
</p>
|
|
<p>
|
|
Octonions see some use in theoretical physics.
|
|
</p>
|
|
<p>
|
|
In practical terms, an octonion is simply an octuple of real numbers
|
|
(α,β,γ,δ,ε,ζ,η,θ), which we can write in the form <span class="emphasis"><em><code class="literal">o = α + βi + γj + δk + εe' + ζi' + ηj' + θk'</code></em></span>,
|
|
where <span class="emphasis"><em><code class="literal">i</code></em></span>, <span class="emphasis"><em><code class="literal">j</code></em></span>
|
|
and <span class="emphasis"><em><code class="literal">k</code></em></span> are the same objects as
|
|
for quaternions, and <span class="emphasis"><em><code class="literal">e'</code></em></span>, <span class="emphasis"><em><code class="literal">i'</code></em></span>,
|
|
<span class="emphasis"><em><code class="literal">j'</code></em></span> and <span class="emphasis"><em><code class="literal">k'</code></em></span>
|
|
are distinct objects which play essentially the same kind of role as
|
|
<span class="emphasis"><em><code class="literal">i</code></em></span> (or <span class="emphasis"><em><code class="literal">j</code></em></span>
|
|
or <span class="emphasis"><em><code class="literal">k</code></em></span>).
|
|
</p>
|
|
<p>
|
|
Addition and a multiplication is defined on the set of octonions, which
|
|
generalize their quaternionic counterparts. The main novelty this time
|
|
is that <span class="bold"><strong>the multiplication is not only not commutative,
|
|
is now not even associative</strong></span> (i.e. there are quaternions <span class="emphasis"><em><code class="literal">x</code></em></span>,
|
|
<span class="emphasis"><em><code class="literal">y</code></em></span> and <span class="emphasis"><em><code class="literal">z</code></em></span>
|
|
such that <span class="emphasis"><em><code class="literal">x(yz) ≠ (xy)z</code></em></span>). A way
|
|
of remembering things is by using the following multiplication table:
|
|
</p>
|
|
<p>
|
|
<span class="inlinemediaobject"><img src="../../octonion/graphics/octonion_blurb17.jpeg" alt="octonion_blurb17"></span>
|
|
</p>
|
|
<p>
|
|
Octonions (and their kin) are described in far more details in this other
|
|
<a href="../../quaternion/TQE.pdf" target="_top">document</a> (with <a href="../../quaternion/TQE_EA.pdf" target="_top">errata
|
|
and addenda</a>).
|
|
</p>
|
|
<p>
|
|
Some traditional constructs, such as the exponential, carry over without
|
|
too much change into the realms of octonions, but other, such as taking
|
|
a square root, do not (the fact that the exponential has a closed form
|
|
is a result of the author, but the fact that the exponential exists at
|
|
all for octonions is known since quite a long time ago).
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../../../utility/operators.htm" target="_top">Operators</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The header <boost/operators.hpp> supplies several sets of class
|
|
templates (in namespace boost). These templates define operators at namespace
|
|
scope in terms of a minimal number of fundamental operators provided
|
|
by the class.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../sf_and_dist/html/index.html" target="_top">Special Functions</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Provides a 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.
|
|
</p>
|
|
<p>
|
|
The function families currently implemented are the gamma, beta &
|
|
erf functions along with the incomplete gamma and beta functions (four
|
|
variants of each) and all the possible inverses of these, plus digamma,
|
|
various factorial functions, Bessel functions, elliptic integrals, sinus
|
|
cardinals (along with their hyperbolic variants), inverse hyperbolic
|
|
functions, Legrendre/Laguerre/Hermite polynomials and various special
|
|
power and logarithmic functions.
|
|
</p>
|
|
<p>
|
|
All the implementations are fully generic and support the use of arbitrary
|
|
"real-number" types, although they are optimised for use with
|
|
types with known-about significand (or mantissa) sizes: typically float,
|
|
double or long double.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../sf_and_dist/html/index.html" target="_top">Statistical Distributions</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Provides a reasonably comprehensive set of statistical distributions,
|
|
upon which higher level statistical tests can be built.
|
|
</p>
|
|
<p>
|
|
The initial focus is on the central univariate distributions. Both continuous
|
|
(like normal & Fisher) and discrete (like binomial & Poisson)
|
|
distributions are provided.
|
|
</p>
|
|
<p>
|
|
A comprehensive tutorial is provided, along with a series of worked examples
|
|
illustrating how the library is used to conduct statistical tests.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../quaternion/html/index.html" target="_top">Quaternions</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Quaternions are a relative of complex numbers.
|
|
</p>
|
|
<p>
|
|
Quaternions are in fact part of a small hierarchy of structures built
|
|
upon the real numbers, which comprise only the set of real numbers (traditionally
|
|
named <span class="emphasis"><em><span class="bold"><strong>R</strong></span></em></span>), the set
|
|
of complex numbers (traditionally named <span class="emphasis"><em><span class="bold"><strong>C</strong></span></em></span>),
|
|
the set of quaternions (traditionally named <span class="emphasis"><em><span class="bold"><strong>H</strong></span></em></span>)
|
|
and the set of octonions (traditionally named <span class="emphasis"><em><span class="bold"><strong>O</strong></span></em></span>),
|
|
which possess interesting mathematical properties (chief among which
|
|
is the fact that they are <span class="emphasis"><em>division algebras</em></span>, <span class="emphasis"><em>i.e.</em></span>
|
|
where the following property is true: if <span class="emphasis"><em><code class="literal">y</code></em></span>
|
|
is an element of that algebra and is <span class="bold"><strong>not equal
|
|
to zero</strong></span>, then <span class="emphasis"><em><code class="literal">yx = yx'</code></em></span>,
|
|
where <span class="emphasis"><em><code class="literal">x</code></em></span> and <span class="emphasis"><em><code class="literal">x'</code></em></span>
|
|
denote elements of that algebra, implies that <span class="emphasis"><em><code class="literal">x =
|
|
x'</code></em></span>). Each member of the hierarchy is a super-set
|
|
of the former.
|
|
</p>
|
|
<p>
|
|
One of the most important aspects of quaternions is that they provide
|
|
an efficient way to parameterize rotations in <span class="emphasis"><em><span class="bold"><strong>R<sup>3</sup></strong></span></em></span>
|
|
(the usual three-dimensional space) and <span class="emphasis"><em><span class="bold"><strong>R<sup>4</sup></strong></span></em></span>.
|
|
</p>
|
|
<p>
|
|
In practical terms, a quaternion is simply a quadruple of real numbers
|
|
(α,β,γ,δ), which we can write in the form <span class="emphasis"><em><code class="literal">q = α + βi + γj + δk</code></em></span>,
|
|
where <span class="emphasis"><em><code class="literal">i</code></em></span> is the same object as
|
|
for complex numbers, and <span class="emphasis"><em><code class="literal">j</code></em></span> and
|
|
<span class="emphasis"><em><code class="literal">k</code></em></span> are distinct objects which
|
|
play essentially the same kind of role as <span class="emphasis"><em><code class="literal">i</code></em></span>.
|
|
</p>
|
|
<p>
|
|
An addition and a multiplication is defined on the set of quaternions,
|
|
which generalize their real and complex counterparts. The main novelty
|
|
here is that <span class="bold"><strong>the multiplication is not commutative</strong></span>
|
|
(i.e. there are quaternions <span class="emphasis"><em><code class="literal">x</code></em></span>
|
|
and <span class="emphasis"><em><code class="literal">y</code></em></span> such that <span class="emphasis"><em><code class="literal">xy
|
|
≠ yx</code></em></span>). A good mnemotechnical way of remembering things
|
|
is by using the formula <span class="emphasis"><em><code class="literal">i*i = j*j = k*k = -1</code></em></span>.
|
|
</p>
|
|
<p>
|
|
Quaternions (and their kin) are described in far more details in this
|
|
other <a href="../../../quaternion/TQE.pdf" target="_top">document</a> (with
|
|
<a href="../../../quaternion/TQE_EA.pdf" target="_top">errata and addenda</a>).
|
|
</p>
|
|
<p>
|
|
Some traditional constructs, such as the exponential, carry over without
|
|
too much change into the realms of quaternions, but other, such as taking
|
|
a square root, do not.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../../../random/index.html" target="_top">Random</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Random numbers are useful in a variety of applications. The Boost Random
|
|
Number Library (Boost.Random for short) provides a vast variety of generators
|
|
and distributions to produce random numbers having useful properties,
|
|
such as uniform distribution.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../../../rational/index.html" target="_top">Rational</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The header rational.hpp provides an implementation of rational numbers.
|
|
The implementation is template-based, in a similar manner to the standard
|
|
complex number class.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a href="../../../numeric/ublas/doc/index.htm" target="_top">uBLAS</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
uBLAS is a C++ template class library that provides BLAS level 1, 2,
|
|
3 functionality for dense, packed and sparse matrices. The design and
|
|
implementation unify mathematical notation via operator overloading and
|
|
efficient code generation via expression templates.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"><p><small>Last revised: December 29, 2006 at 11:08:32 +0000</small></p></td>
|
|
<td align="right"><small></small></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav"></div>
|
|
</body>
|
|
</html>
|