diff options
| author | Christoph Berg <myon@debian.org> | 2020-05-11 22:18:20 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-05-11 22:18:20 +0200 |
| commit | a8edac06b534058e52126c4d55e23b217df2df91 (patch) | |
| tree | f2c3567fae58aad676d544ee8f07ac78dd2eb1ec /boost/libs/math/example/arcsine_example.cpp | |
| parent | 4f6c0156a70e8f2ff70fe5a1a39f5e9b22ffd026 (diff) | |
| parent | 32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (diff) | |
Update upstream source from tag 'upstream/2.2.0_rc1+repack'
Update to upstream version '2.2.0~rc1+repack'
with Debian dir fe177bc6cd2d4c1256a3775504f6010be54e7463
Diffstat (limited to 'boost/libs/math/example/arcsine_example.cpp')
| -rw-r--r-- | boost/libs/math/example/arcsine_example.cpp | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/boost/libs/math/example/arcsine_example.cpp b/boost/libs/math/example/arcsine_example.cpp deleted file mode 100644 index 7a27fb47..00000000 --- a/boost/libs/math/example/arcsine_example.cpp +++ /dev/null @@ -1,88 +0,0 @@ -// arcsine_example.cpp - -// Copyright John Maddock 2014. -// Copyright Paul A. Bristow 2014. - -// Use, modification and distribution are subject to 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) - -// Example for the arcsine Distribution. - -// Note: Contains Quickbook snippets in comments. - -//[arcsine_snip_1 -#include <boost/math/distributions/arcsine.hpp> // For arcsine_distribution. -//] [/arcsine_snip_1] - -#include <iostream> -#include <exception> - -int main() -{ - std::cout << "Examples of Arcsine distribution." << std::endl; - std::cout.precision(3); // Avoid uninformative decimal digits. - - using boost::math::arcsine; - - arcsine as; // Construct a default `double` standard [0, 1] arcsine distribution. - -//[arcsine_snip_2 - std::cout << pdf(as, 1. / 2) << std::endl; // 0.637 - // pdf has a minimum at x = 0.5 -//] [/arcsine_snip_2] - -//[arcsine_snip_3 - std::cout << pdf(as, 1. / 4) << std::endl; // 0.735 -//] [/arcsine_snip_3] - - -//[arcsine_snip_4 - std::cout << cdf(as, 0.05) << std::endl; // 0.144 -//] [/arcsine_snip_4] - -//[arcsine_snip_5 - std::cout << 2 * cdf(as, 1 - 0.975) << std::endl; // 0.202 -//] [/arcsine_snip_5] - - -//[arcsine_snip_6 - std::cout << 2 * cdf(complement(as, 0.975)) << std::endl; // 0.202 -//] [/arcsine_snip_6] - -//[arcsine_snip_7 - std::cout << quantile(as, 1 - 0.2 / 2) << std::endl; // 0.976 - - std::cout << quantile(complement(as, 0.2 / 2)) << std::endl; // 0.976 -//] [/arcsine_snip_7] - -{ -//[arcsine_snip_8 - using boost::math::arcsine_distribution; - - arcsine_distribution<> as(2, 5); // Cconstructs a double arcsine distribution. - assert(as.x_min() == 2.); // as.x_min() returns 2. - assert(as.x_max() == 5.); // as.x_max() returns 5. -//] [/arcsine_snip_8] -} - return 0; - -} // int main() - -/* -[arcsine_output - -Example of Arcsine distribution -0.637 -0.735 -0.144 -0.202 -0.202 -0.976 -0.976 - -] [/arcsine_output] -*/ - - |
