File: landau.qbk

package info (click to toggle)
scipy 1.16.0-1exp7
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 234,820 kB
  • sloc: cpp: 503,145; python: 344,611; ansic: 195,638; javascript: 89,566; fortran: 56,210; cs: 3,081; f90: 1,150; sh: 848; makefile: 785; pascal: 284; csh: 135; lisp: 134; xml: 56; perl: 51
file content (131 lines) | stat: -rw-r--r-- 4,394 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[section:landau_dist Landau Distribution]

``#include <boost/math/distributions/landau.hpp>``

   template <class RealType = double,
             class ``__Policy``   = ``__policy_class`` >
   class landau_distribution;

   typedef landau_distribution<> landau;

   template <class RealType, class ``__Policy``>
   class landau_distribution
   {
   public:
      typedef RealType  value_type;
      typedef Policy    policy_type;

      BOOST_MATH_GPU_ENABLED landau_distribution(RealType location = 0, RealType scale = 1);

      BOOST_MATH_GPU_ENABLED RealType location()const;
      BOOST_MATH_GPU_ENABLED RealType scale()const;
      BOOST_MATH_GPU_ENABLED RealType bias()const;
   };

The [@http://en.wikipedia.org/wiki/landau_distribution Landau distribution]
is named after Lev Landau.
It is special case of a [@http://en.wikipedia.org/wiki/Stable_distribution stable distribution]
with shape parameter [alpha]=1, [beta]=1.

[@http://en.wikipedia.org/wiki/Probability_distribution probability distribution function PDF]
given by:

[equation landau_ref1]  [/f(x; \mu, c)=\frac{1}{\pi c} \int_{0}^{\infty} \exp(-t) \cos \left( t \left( \frac{x-\mu}{c}\right) + \frac{2t}{\pi} \log \left( \frac{t}{c} \right)  \right) dt]

The location parameter [mu] 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.

The distribution describe the statistical property of the energy loss by
charged particles as they traversing a thin layer of matter.

The following graph shows how the distributions moves as the
location parameter changes:

[graph landau_pdf1]

While the following graph shows how the shape (scale) parameter alters
the distribution:

[graph landau_pdf2]

[h4 Member Functions]

   BOOST_MATH_GPU_ENABLED landau_distribution(RealType location = 0, RealType scale = 1);

Constructs a landau distribution, with location parameter /location/
and scale parameter /scale/.  When these parameters take their default
values (location = 0, scale = 1)
then the result is a Standard landau Distribution.

Requires scale > 0, otherwise calls __domain_error.

   BOOST_MATH_GPU_ENABLED RealType location()const;

Returns the location parameter of the distribution.

   BOOST_MATH_GPU_ENABLED RealType scale()const;

Returns the scale parameter of the distribution.

   BOOST_MATH_GPU_ENABLED RealType bias()const;

Returns the amount of translation by the scale parameter.
[expression bias = - 2 / [pi] log(c)]

[h4 Non-member Accessors]

All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions]
that are generic to all distributions are supported: __usual_accessors.
For this distribution all non-member accessor functions are marked with `BOOST_MATH_GPU_ENABLED` and can
be run on both host and device.

Note however that the landau distribution does not have a mean,
standard deviation, etc. See __math_undefined
[/link math_toolkit.pol_ref.assert_undefined mathematically undefined function]
to control whether these should fail to compile with a BOOST_STATIC_ASSERTION_FAILURE,
which is the default.

Alternately, the functions __mean, __sd,
__variance, __skewness, __kurtosis and __kurtosis_excess will all
return a __domain_error if called.

The domain of the random variable is \[-[max_value], +[min_value]\].

[h4 Accuracy]

The error is within 4 epsilon except for the rapidly decaying left tail.

Errors in the PDF at 64-bit double precision:

[$../graphs/landau_pdf_accuracy_64.png]

Errors in the CDF at 64-bit double precision:

[$../graphs/landau_cdf_accuracy_64.png]

Errors in the CDF-complement at 64-bit double precision:

[$../graphs/landau_ccdf_accuracy_64.png]

[h4 Implementation]

See references.

[h4 References]

* [@http://en.wikipedia.org/wiki/landau_distribution landau distribution]
* T. Yoshimura, Numerical Evaluation and High Precision Approximation Formula for Landau Distribution,
DOI: 10.36227/techrxiv.171822215.53612870/v2, 2024.

[endsect][/section:landau_dist landau]

[/ landau.qbk
  Copyright Takuma Yoshimura 2024.
  Distributed under the Boost Software License, Version 1.0.
  (See accompanying file LICENSE_1_0.txt or copy at
  http://www.boost.org/LICENSE_1_0.txt).
]