<title>Headers and Namespaces</title>
<link rel="stylesheet" href="../../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
-<link rel="home" href="../../../index.html" title="Math Toolkit 2.10.0">
-<link rel="up" href="../overview.html" title="Overview of Distributions">
-<link rel="prev" href="../overview.html" title="Overview of Distributions">
+<link rel="home" href="../../../index.html" title="Math Toolkit 2.11.0">
+<link rel="up" href="../overview.html" title="Overview of Statistical Distributions">
+<link rel="prev" href="../overview.html" title="Overview of Statistical Distributions">
<link rel="next" href="objects.html" title="Distributions are Objects">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Namespaces</a>
</h4></div></div></div>
<p>
- All the code in this library is inside namespace boost::math.
+ All the code in this library is inside <code class="computeroutput"><span class="keyword">namespace</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span></code>.
</p>
<p>
In order to use a distribution <span class="emphasis"><em>my_distribution</em></span> you
- will need to include either the header <boost/math/my_distribution.hpp>
- or the "include all the distributions" header: <boost/math/distributions.hpp>.
+ will need to include either the header(s) <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">my_distribution</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ (quicker compiles), or the "include all the distributions" header:
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>.
</p>
<p>
- For example, to use the Students-t distribution include either <boost/math/students_t.hpp>
- or <boost/math/distributions.hpp>
+ For example, to use the Students-t distribution include either <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">students_t</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> or <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<p>
You also need to bring distribution names into scope, perhaps with a <code class="computeroutput"><span class="keyword">using</span> <span class="keyword">namespace</span>
<th align="left">Caution</th>
</tr>
<tr><td align="left" valign="top"><p>
- Some math function names are also used in namespace std so including
- <random> could cause ambiguity!
+ Some math function names are also used in <code class="computeroutput"><span class="keyword">namespace</span>
+ <span class="identifier">std</span></code> so including <code class="computeroutput"><span class="special"><</span><span class="identifier">random</span><span class="special">></span></code> could cause ambiguity!
</p></td></tr>
</table></div>
</div>