]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/doc/html/math_toolkit/namespaces.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / math / doc / html / math_toolkit / namespaces.html
CommitLineData
7c673cae
FG
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4<title>Namespaces</title>
5<link rel="stylesheet" href="../math.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7<link rel="home" href="../index.html" title="Math Toolkit 2.5.1">
8<link rel="up" href="../overview.html" title="Chapter&#160;1.&#160;Overview">
9<link rel="prev" href="directories.html" title="Directory and File Structure">
10<link rel="next" href="result_type.html" title="Calculation of the Type of the Result">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="directories.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="result_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h2 class="title" style="clear: both">
27<a name="math_toolkit.namespaces"></a><a class="link" href="namespaces.html" title="Namespaces">Namespaces</a>
28</h2></div></div></div>
29<p>
30 All math functions and distributions are in <code class="computeroutput"><span class="keyword">namespace</span>
31 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span></code>
32 </p>
33<p>
34 So, for example, the Students-t distribution template in <code class="computeroutput"><span class="keyword">namespace</span>
35 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span></code> is
36 </p>
37<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">students_t_distribution</span>
38</pre>
39<p>
40 and can be instantiated with the help of the reserved name <code class="computeroutput"><span class="identifier">students_t</span></code>(for
41 <code class="computeroutput"><span class="identifier">RealType</span> <span class="keyword">double</span></code>)
42 </p>
43<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">students_t_distribution</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">students_t</span><span class="special">;</span>
44
45<span class="identifier">student_t</span> <span class="identifier">mydist</span><span class="special">(</span><span class="number">10</span><span class="special">);</span>
46</pre>
47<div class="warning"><table border="0" summary="Warning">
48<tr>
49<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/src/images/warning.png"></td>
50<th align="left">Warning</th>
51</tr>
52<tr><td align="left" valign="top"><p>
53 Some distribution names are also used in std random library, so to avoid
54 the risk of ambiguity it is better to make explicit using declarations, for
55 example: <code class="computeroutput"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">students_t_distribution</span></code>
56 </p></td></tr>
57</table></div>
58<p>
59 Functions not intended for use by applications are in <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">detail</span></code>.
60 </p>
61<p>
62 Functions that may have more general use, like <code class="computeroutput"><span class="identifier">digits</span></code>
63 (significand), <code class="computeroutput"><span class="identifier">max_value</span></code>,
64 <code class="computeroutput"><span class="identifier">min_value</span></code> and <code class="computeroutput"><span class="identifier">epsilon</span></code> are in <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tools</span></code>.
65 </p>
66<p>
67 <a class="link" href="../policy.html" title="Chapter&#160;15.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a> and configuration information is in namespace
68 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">policies</span></code>.
69 </p>
70<div class="tip"><table border="0" summary="Tip">
71<tr>
72<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../doc/src/images/tip.png"></td>
73<th align="left">Tip</th>
74</tr>
75<tr><td align="left" valign="top"><p>
76 Many code snippets assume implicit namespace(s), for example, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span></code> or
77 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span></code>.
78 </p></td></tr>
79</table></div>
80</div>
81<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
82<td align="left"></td>
83<td align="right"><div class="copyright-footer">Copyright &#169; 2006-2010, 2012-2014 Nikhar Agrawal,
84 Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
85 Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R&#229;de, Gautam Sewani,
86 Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p>
87 Distributed under the Boost Software License, Version 1.0. (See accompanying
88 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>)
89 </p>
90</div></td>
91</tr></table>
92<hr>
93<div class="spirit-nav">
94<a accesskey="p" href="directories.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="result_type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
95</div>
96</body>
97</html>