mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
225 lines
16 KiB
HTML
225 lines
16 KiB
HTML
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>Landau Distribution</title>
|
||
<link rel="stylesheet" href="../../../math.css" type="text/css">
|
||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||
<link rel="home" href="../../../index.html" title="Math Toolkit 4.2.1">
|
||
<link rel="up" href="../dists.html" title="Distributions">
|
||
<link rel="prev" href="kolmogorov_smirnov_dist.html" title="Kolmogorov-Smirnov Distribution">
|
||
<link rel="next" href="laplace_dist.html" title="Laplace Distribution">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
</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.html">Home</a></td>
|
||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||
</tr></table>
|
||
<hr>
|
||
<div class="spirit-nav">
|
||
<a accesskey="p" href="kolmogorov_smirnov_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="laplace_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||
</div>
|
||
<div class="section">
|
||
<div class="titlepage"><div><div><h4 class="title">
|
||
<a name="math_toolkit.dist_ref.dists.landau_dist"></a><a class="link" href="landau_dist.html" title="Landau Distribution">Landau Distribution</a>
|
||
</h4></div></div></div>
|
||
<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">landau</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></pre>
|
||
<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>
|
||
<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>
|
||
<span class="keyword">class</span> <span class="identifier">landau_distribution</span><span class="special">;</span>
|
||
|
||
<span class="keyword">typedef</span> <span class="identifier">landau_distribution</span><span class="special"><></span> <span class="identifier">landau</span><span class="special">;</span>
|
||
|
||
<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>
|
||
<span class="keyword">class</span> <span class="identifier">landau_distribution</span>
|
||
<span class="special">{</span>
|
||
<span class="keyword">public</span><span class="special">:</span>
|
||
<span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span>
|
||
<span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span>
|
||
|
||
<span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">landau_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>
|
||
|
||
<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>
|
||
<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>
|
||
<span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">bias</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||
<span class="special">};</span>
|
||
</pre>
|
||
<p>
|
||
The <a href="http://en.wikipedia.org/wiki/landau_distribution" target="_top">Landau
|
||
distribution</a> is named after Lev Landau. It is special case of a
|
||
<a href="http://en.wikipedia.org/wiki/Stable_distribution" target="_top">stable distribution</a>
|
||
with shape parameter α=1, β=1.
|
||
</p>
|
||
<p>
|
||
<a href="http://en.wikipedia.org/wiki/Probability_distribution" target="_top">probability
|
||
distribution function PDF</a> given by:
|
||
</p>
|
||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||
<span class="inlinemediaobject"><img src="../../../../equations/landau_ref1.svg"></span>
|
||
|
||
</p></blockquote></div>
|
||
<p>
|
||
The location parameter μ is the location of the distribution, while the scale
|
||
parameter [c] determines the width of the distribution, but unlike other
|
||
scalable distributions, it has a peculiarity that changes the location
|
||
of the distribution. If the location is zero, and the scale 1, then the
|
||
result is a standard landau distribution.
|
||
</p>
|
||
<p>
|
||
The distribution describe the statistical property of the energy loss by
|
||
charged particles as they traversing a thin layer of matter.
|
||
</p>
|
||
<p>
|
||
The following graph shows how the distributions moves as the location parameter
|
||
changes:
|
||
</p>
|
||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||
<span class="inlinemediaobject"><img src="../../../../graphs/landau_pdf1.svg" align="middle"></span>
|
||
|
||
</p></blockquote></div>
|
||
<p>
|
||
While the following graph shows how the shape (scale) parameter alters
|
||
the distribution:
|
||
</p>
|
||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||
<span class="inlinemediaobject"><img src="../../../../graphs/landau_pdf2.svg" align="middle"></span>
|
||
|
||
</p></blockquote></div>
|
||
<h5>
|
||
<a name="math_toolkit.dist_ref.dists.landau_dist.h0"></a>
|
||
<span class="phrase"><a name="math_toolkit.dist_ref.dists.landau_dist.member_functions"></a></span><a class="link" href="landau_dist.html#math_toolkit.dist_ref.dists.landau_dist.member_functions">Member
|
||
Functions</a>
|
||
</h5>
|
||
<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">landau_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>
|
||
</pre>
|
||
<p>
|
||
Constructs a landau distribution, with location parameter <span class="emphasis"><em>location</em></span>
|
||
and scale parameter <span class="emphasis"><em>scale</em></span>. When these parameters take
|
||
their default values (location = 0, scale = 1) then the result is a Standard
|
||
landau Distribution.
|
||
</p>
|
||
<p>
|
||
Requires scale > 0, otherwise calls <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>.
|
||
</p>
|
||
<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>
|
||
</pre>
|
||
<p>
|
||
Returns the location parameter of the distribution.
|
||
</p>
|
||
<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>
|
||
</pre>
|
||
<p>
|
||
Returns the scale parameter of the distribution.
|
||
</p>
|
||
<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">bias</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||
</pre>
|
||
<p>
|
||
Returns the amount of translation by the scale parameter.
|
||
</p>
|
||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||
<span class="serif_italic">bias = - 2 / π log(c)</span>
|
||
</p></blockquote></div>
|
||
<h5>
|
||
<a name="math_toolkit.dist_ref.dists.landau_dist.h1"></a>
|
||
<span class="phrase"><a name="math_toolkit.dist_ref.dists.landau_dist.non_member_accessors"></a></span><a class="link" href="landau_dist.html#math_toolkit.dist_ref.dists.landau_dist.non_member_accessors">Non-member
|
||
Accessors</a>
|
||
</h5>
|
||
<p>
|
||
All the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member accessor
|
||
functions</a> that are generic to all distributions are supported:
|
||
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.cdf">Cumulative Distribution Function</a>,
|
||
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.pdf">Probability Density Function</a>,
|
||
<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>,
|
||
__logcdf, __logpdf, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mean">mean</a>,
|
||
<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>,
|
||
<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>,
|
||
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>,
|
||
<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
|
||
all non-member accessor functions are marked with <code class="computeroutput"><span class="identifier">BOOST_MATH_GPU_ENABLED</span></code>
|
||
and can be run on both host and device.
|
||
</p>
|
||
<p>
|
||
Note however that the landau distribution does not have a mean, standard
|
||
deviation, etc. See <a class="link" href="../../pol_ref/assert_undefined.html" title="Mathematically Undefined Function Policies">mathematically
|
||
undefined function</a> to control whether these should fail to compile
|
||
with a BOOST_STATIC_ASSERTION_FAILURE, which is the default.
|
||
</p>
|
||
<p>
|
||
Alternately, the functions <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mean">mean</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.variance">variance</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>
|
||
and <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>
|
||
will all return a <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>
|
||
if called.
|
||
</p>
|
||
<p>
|
||
The domain of the random variable is [-[max_value], +[min_value]].
|
||
</p>
|
||
<h5>
|
||
<a name="math_toolkit.dist_ref.dists.landau_dist.h2"></a>
|
||
<span class="phrase"><a name="math_toolkit.dist_ref.dists.landau_dist.accuracy"></a></span><a class="link" href="landau_dist.html#math_toolkit.dist_ref.dists.landau_dist.accuracy">Accuracy</a>
|
||
</h5>
|
||
<p>
|
||
The error is within 4 epsilon except for the rapidly decaying left tail.
|
||
</p>
|
||
<p>
|
||
Errors in the PDF at 64-bit double precision:
|
||
</p>
|
||
<p>
|
||
<span class="inlinemediaobject"><img src="../../../../graphs/landau_pdf_accuracy_64.png"></span>
|
||
</p>
|
||
<p>
|
||
Errors in the CDF at 64-bit double precision:
|
||
</p>
|
||
<p>
|
||
<span class="inlinemediaobject"><img src="../../../../graphs/landau_cdf_accuracy_64.png"></span>
|
||
</p>
|
||
<p>
|
||
Errors in the CDF-complement at 64-bit double precision:
|
||
</p>
|
||
<p>
|
||
<span class="inlinemediaobject"><img src="../../../../graphs/landau_ccdf_accuracy_64.png"></span>
|
||
</p>
|
||
<h5>
|
||
<a name="math_toolkit.dist_ref.dists.landau_dist.h3"></a>
|
||
<span class="phrase"><a name="math_toolkit.dist_ref.dists.landau_dist.implementation"></a></span><a class="link" href="landau_dist.html#math_toolkit.dist_ref.dists.landau_dist.implementation">Implementation</a>
|
||
</h5>
|
||
<p>
|
||
See references.
|
||
</p>
|
||
<h5>
|
||
<a name="math_toolkit.dist_ref.dists.landau_dist.h4"></a>
|
||
<span class="phrase"><a name="math_toolkit.dist_ref.dists.landau_dist.references"></a></span><a class="link" href="landau_dist.html#math_toolkit.dist_ref.dists.landau_dist.references">References</a>
|
||
</h5>
|
||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||
<li class="listitem">
|
||
<a href="http://en.wikipedia.org/wiki/landau_distribution" target="_top">landau
|
||
distribution</a>
|
||
</li>
|
||
<li class="listitem">
|
||
T. Yoshimura, Numerical Evaluation and High Precision Approximation
|
||
Formula for Landau Distribution, DOI: 10.36227/techrxiv.171822215.53612870/v2,
|
||
2024.
|
||
</li>
|
||
</ul></div>
|
||
</div>
|
||
<div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland,
|
||
Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno
|
||
Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde,
|
||
Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle
|
||
Walker and Xiaogang Zhang<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>
|
||
<hr>
|
||
<div class="spirit-nav">
|
||
<a accesskey="p" href="kolmogorov_smirnov_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="laplace_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||
</div>
|
||
</body>
|
||
</html>
|