2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

14 Commits

Author SHA1 Message Date
Matt Borland
26711525ca Remove uses of boost/cstdint without header called 2021-03-21 16:13:10 +03:00
Matt Borland
5ae92ba0c3 Replace several boost types [ci skip] 2021-02-15 16:00:08 +03:00
Evan Miller
18ed616376 Kolmogorov-Smirnov distribution (#422)
* Kolmogorov-Smirnov distribution #421

Add a new distribution, kolmogorov_smirnov_distribution, which takes a
parameter that represents the number of observations used in a
Kolmogorov-Smirnov test. (The K-S test is a popular test for comparing
two CDFs, but the test statistic is not implemented here.)

This implementation includes Kolmogorov's original 1st order Taylor
expansion. There is a literature on the distribution's other
mathematical properties (higher order terms and exact version); this
literature is summarized in the main header file for anyone who may
want to expand the implementation later.

The CDF is implemented using a Jacobi theta function, and the PDF is a
hand-rolled derivative of that function. Quantiles plug the CDF and PDF
into a Newton-Raphson iteration. The mean and variance have nice
closed-form expressions, and the mode uses a dumb run-time maximizer.

This commit includes graphs, a ULP plotter for the PDF, and the usual
compilation and numerical tests. The test file is on the small side, but
it integrates the distribution from zero to infinity, and covers the
quantiles pretty well. As of now the numerical tests only verify
self-consistency (e.g. distribution moments and CDF-quantile relations),
so there's room to add some external checks.

* Implement skewness for K-S distribution [CI SKIP]

The third moment integrates nicely with the help of Apery's constant
(zeta_three). Verify the result via quadrature.

* Implement kurtosis for the K-S distribution

Verify the result via quadrature.
2020-09-04 08:48:51 -04:00
jzmaddock
1e0179c883 Remove dispatching via mpl and stick to boost::integral_constant.
Simplify the dispatching logic to use mpl::if_ and broken compiler workarounds less often.
Fixes: https://github.com/boostorg/type_traits/issues/133.
2020-01-13 15:14:48 +00:00
Brian Wignall
3c976e5e09 Fix typos 2019-12-24 21:42:09 -05:00
Brian Wignall
df17d11299 Fix more typos, via latest version of typochecker tool 2019-12-20 10:41:42 -05:00
pabristow
ffb025ca2c First very rough prototype of Lambert W function, example of calculating diode current versus voltage, and some tests, including multiprecision and fixed_point types. Not yet using policies and trouble near the singularity at z=-exp(-1) and large z. 2016-12-22 18:30:27 +00:00
pabristow
f9b2addcdc Improved docs and tests and graphs. 2014-11-27 16:44:42 +00:00
pabristow
716e7eff75 First draft of working docs. Need more tests. 2014-10-20 14:36:03 +01:00
pabristow
d0a3f8326b Attempt to correct graph failure for arcsine(-1, 1) where no mode and lower support negative means the 1% margin was added so -1.01 instead of subtracted to -0.99. 2014-10-03 09:58:16 +01:00
sguazt
2ded2d0822 [distributions] Hyper-Exponential: added two more graphs (one with different probs and same rates, and another one with different number of phases but same mean). 2014-09-07 18:42:25 +02:00
sguazt
0396d72311 [distributions] Hyper-Exponential: added two more graphs (one with different probs and same rates, and another one with different number of phases but same mean). 2014-09-07 18:41:56 +02:00
sguazt
a8ac5aab96 [distributions] Hyper-Exponential: finalized doc. 2014-08-26 17:07:24 +02:00
John Maddock
57cba0eef4 Reorganise directory structure to make things easier to find and maintain.
[SVN r84143]
2013-05-05 12:32:36 +00:00