|
| 1 | +<html> |
| 2 | +<head> |
| 3 | +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 4 | +<title>Holtsmark Distribution</title> |
| 5 | +<link rel="stylesheet" href="../../../math.css" type="text/css"> |
| 6 | +<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 7 | +<link rel="home" href="../../../index.html" title="Math Toolkit 4.2.1"> |
| 8 | +<link rel="up" href="../dists.html" title="Distributions"> |
| 9 | +<link rel="prev" href="geometric_dist.html" title="Geometric Distribution"> |
| 10 | +<link rel="next" href="hyperexponential_dist.html" title="Hyperexponential Distribution"> |
| 11 | +<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 12 | +</head> |
| 13 | +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 14 | +<table cellpadding="2" width="100%"><tr> |
| 15 | +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> |
| 16 | +<td align="center"><a href="../../../../../../../index.html">Home</a></td> |
| 17 | +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> |
| 18 | +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> |
| 19 | +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> |
| 20 | +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> |
| 21 | +</tr></table> |
| 22 | +<hr> |
| 23 | +<div class="spirit-nav"> |
| 24 | +<a accesskey="p" href="geometric_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.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="hyperexponential_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> |
| 25 | +</div> |
| 26 | +<div class="section"> |
| 27 | +<div class="titlepage"><div><div><h4 class="title"> |
| 28 | +<a name="math_toolkit.dist_ref.dists.holtsmark_dist"></a><a class="link" href="holtsmark_dist.html" title="Holtsmark Distribution">Holtsmark |
| 29 | + Distribution</a> |
| 30 | +</h4></div></div></div> |
| 31 | +<pre class="programlisting"><span class="preprocessor">#include</span> <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">holtsmark</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></pre> |
| 32 | +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span> |
| 33 | + <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a> <span class="special">=</span> <a class="link" href="../../pol_ref/pol_ref_ref.html" title="Policy Class Reference">policies::policy<></a> <span class="special">></span> |
| 34 | +<span class="keyword">class</span> <span class="identifier">holtsmark_distribution</span><span class="special">;</span> |
| 35 | + |
| 36 | +<span class="keyword">typedef</span> <span class="identifier">holtsmark_distribution</span><span class="special"><></span> <span class="identifier">holtsmark</span><span class="special">;</span> |
| 37 | + |
| 38 | +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span> |
| 39 | +<span class="keyword">class</span> <span class="identifier">holtsmark_distribution</span> |
| 40 | +<span class="special">{</span> |
| 41 | +<span class="keyword">public</span><span class="special">:</span> |
| 42 | + <span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span> |
| 43 | + <span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span> |
| 44 | + |
| 45 | + <span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">holtsmark_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">location</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span> |
| 46 | + |
| 47 | + <span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">location</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> |
| 48 | + <span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> |
| 49 | +<span class="special">};</span> |
| 50 | +</pre> |
| 51 | +<p> |
| 52 | + The <a href="http://en.wikipedia.org/wiki/holtsmark_distribution" target="_top">Holtsmark |
| 53 | + distribution</a> is named after Johan Peter Holtsmark. It is special |
| 54 | + case of a <a href="http://en.wikipedia.org/wiki/Stable_distribution" target="_top">stable |
| 55 | + distribution</a> with shape parameter α=3/2, β=0. |
| 56 | + </p> |
| 57 | +<p> |
| 58 | + <a href="http://en.wikipedia.org/wiki/Probability_distribution" target="_top">probability |
| 59 | + distribution function PDF</a> given by: |
| 60 | + </p> |
| 61 | +<div class="blockquote"><blockquote class="blockquote"><p> |
| 62 | + <span class="inlinemediaobject"><img src="../../../../equations/holtsmark_ref1.svg"></span> |
| 63 | + |
| 64 | + </p></blockquote></div> |
| 65 | +<p> |
| 66 | + The location parameter μ is the location of the distribution, while the scale |
| 67 | + parameter [c] determines the width of the distribution. If the location |
| 68 | + is zero, and the scale 1, then the result is a standard holtsmark distribution. |
| 69 | + </p> |
| 70 | +<p> |
| 71 | + The distribution especially used in astrophysics for modeling gravitational |
| 72 | + bodies. |
| 73 | + </p> |
| 74 | +<p> |
| 75 | + The following graph shows how the distributions moves as the location parameter |
| 76 | + changes: |
| 77 | + </p> |
| 78 | +<div class="blockquote"><blockquote class="blockquote"><p> |
| 79 | + <span class="inlinemediaobject"><img src="../../../../graphs/holtsmark_pdf1.svg" align="middle"></span> |
| 80 | + |
| 81 | + </p></blockquote></div> |
| 82 | +<p> |
| 83 | + While the following graph shows how the shape (scale) parameter alters |
| 84 | + the distribution: |
| 85 | + </p> |
| 86 | +<div class="blockquote"><blockquote class="blockquote"><p> |
| 87 | + <span class="inlinemediaobject"><img src="../../../../graphs/holtsmark_pdf2.svg" align="middle"></span> |
| 88 | + |
| 89 | + </p></blockquote></div> |
| 90 | +<h5> |
| 91 | +<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h0"></a> |
| 92 | + <span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.member_functions"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.member_functions">Member |
| 93 | + Functions</a> |
| 94 | + </h5> |
| 95 | +<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">holtsmark_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">location</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span> |
| 96 | +</pre> |
| 97 | +<p> |
| 98 | + Constructs a holtsmark distribution, with location parameter <span class="emphasis"><em>location</em></span> |
| 99 | + and scale parameter <span class="emphasis"><em>scale</em></span>. When these parameters take |
| 100 | + their default values (location = 0, scale = 1) then the result is a Standard |
| 101 | + holtsmark Distribution. |
| 102 | + </p> |
| 103 | +<p> |
| 104 | + Requires scale > 0, otherwise calls <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>. |
| 105 | + </p> |
| 106 | +<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">location</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> |
| 107 | +</pre> |
| 108 | +<p> |
| 109 | + Returns the location parameter of the distribution. |
| 110 | + </p> |
| 111 | +<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> |
| 112 | +</pre> |
| 113 | +<p> |
| 114 | + Returns the scale parameter of the distribution. |
| 115 | + </p> |
| 116 | +<h5> |
| 117 | +<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h1"></a> |
| 118 | + <span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.non_member_accessors"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.non_member_accessors">Non-member |
| 119 | + Accessors</a> |
| 120 | + </h5> |
| 121 | +<p> |
| 122 | + All the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member accessor |
| 123 | + functions</a> that are generic to all distributions are supported: |
| 124 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.cdf">Cumulative Distribution Function</a>, |
| 125 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.pdf">Probability Density Function</a>, |
| 126 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.quantile">Quantile</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.hazard">Hazard Function</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.chf">Cumulative Hazard Function</a>, |
| 127 | + __logcdf, __logpdf, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mean">mean</a>, |
| 128 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.median">median</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mode">mode</a>, |
| 129 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.variance">variance</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.sd">standard deviation</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.skewness">skewness</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis">kurtosis</a>, |
| 130 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>, |
| 131 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.range">range</a> and <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.support">support</a>. For this distribution |
| 132 | + all non-member accessor functions are marked with <code class="computeroutput"><span class="identifier">BOOST_MATH_GPU_ENABLED</span></code> |
| 133 | + and can be run on both host and device. |
| 134 | + </p> |
| 135 | +<p> |
| 136 | + Note however that the holtsmark distribution does not have a skewness, |
| 137 | + kurtosis, etc. See <a class="link" href="../../pol_ref/assert_undefined.html" title="Mathematically Undefined Function Policies">mathematically |
| 138 | + undefined function</a> to control whether these should fail to compile |
| 139 | + with a BOOST_STATIC_ASSERTION_FAILURE, which is the default. |
| 140 | + </p> |
| 141 | +<p> |
| 142 | + Alternately, the functions <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.skewness">skewness</a>, |
| 143 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis">kurtosis</a> and |
| 144 | + <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a> |
| 145 | + will all return a <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a> |
| 146 | + if called. |
| 147 | + </p> |
| 148 | +<p> |
| 149 | + The domain of the random variable is [-[max_value], +[min_value]]. |
| 150 | + </p> |
| 151 | +<h5> |
| 152 | +<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h2"></a> |
| 153 | + <span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.accuracy"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.accuracy">Accuracy</a> |
| 154 | + </h5> |
| 155 | +<p> |
| 156 | + The error is within 4 epsilon. |
| 157 | + </p> |
| 158 | +<p> |
| 159 | + Errors in the PDF at 64-bit double precision: |
| 160 | + </p> |
| 161 | +<p> |
| 162 | + <span class="inlinemediaobject"><img src="../../../../graphs/holtsmark_pdf_accuracy_64.png"></span> |
| 163 | + </p> |
| 164 | +<p> |
| 165 | + Errors in the CDF-complement at 64-bit double precision: |
| 166 | + </p> |
| 167 | +<p> |
| 168 | + <span class="inlinemediaobject"><img src="../../../../graphs/holtsmark_ccdf_accuracy_64.png"></span> |
| 169 | + </p> |
| 170 | +<h5> |
| 171 | +<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h3"></a> |
| 172 | + <span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.implementation"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.implementation">Implementation</a> |
| 173 | + </h5> |
| 174 | +<p> |
| 175 | + See references. |
| 176 | + </p> |
| 177 | +<h5> |
| 178 | +<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h4"></a> |
| 179 | + <span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.references"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.references">References</a> |
| 180 | + </h5> |
| 181 | +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> |
| 182 | +<li class="listitem"> |
| 183 | + <a href="http://en.wikipedia.org/wiki/holtsmark_distribution" target="_top">Holtsmark |
| 184 | + Distribution</a> |
| 185 | + </li> |
| 186 | +<li class="listitem"> |
| 187 | + T. Yoshimura, Numerical Evaluation and High Precision Approximation |
| 188 | + Formula for Holtsmark Distribution, DOI: 10.36227/techrxiv.172054657.73020014/v1, |
| 189 | + 2024. |
| 190 | + </li> |
| 191 | +</ul></div> |
| 192 | +</div> |
| 193 | +<div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland, |
| 194 | + Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno |
| 195 | + Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde, |
| 196 | + Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle |
| 197 | + Walker and Xiaogang Zhang<p> |
| 198 | + Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 199 | + 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>) |
| 200 | + </p> |
| 201 | +</div> |
| 202 | +<hr> |
| 203 | +<div class="spirit-nav"> |
| 204 | +<a accesskey="p" href="geometric_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.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="hyperexponential_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> |
| 205 | +</div> |
| 206 | +</body> |
| 207 | +</html> |
0 commit comments