From fdbb3ed7ce85b8b199bb8428969d77cb6a46fa7b Mon Sep 17 00:00:00 2001
From: pabristow Last revised: March 30, 2021 at 17:44:57 GMT Last revised: June 16, 2021 at 10:35:24 GMT 1 2 4 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z means means_and_covariance A B C D E F G H I K L M N O P Q R S T U V W A B C D E F G H I K L N P R S T U V W BOOST_MATH_STANDALONE BOOST_MATH_STD_USING BOOST_MATH_USE_FLOAT128 BOOST_STRINGIZE 1 2 4 5 7 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z BOOST_MATH_STANDALONE BOOST_MATH_STD_USING BOOST_MATH_USE_FLOAT128 BOOST_STRINGIZE bracket_and_solve_root Error Handling F Distribution Examples Facets for Floating-Point Infinities and NaNs means means_and_covariance
This implicitly calls the constructor with approximation order 3, and hence
@@ -87,7 +87,7 @@
A call to the constructor with an explicit approximation order is demonstrated
below
To evaluate the interpolant, simply use
@@ -168,7 +168,7 @@
// We'll skip the code for filling the above vectors with data for now...
// Now we want to interpolate this potential at any r:
- boost::math::barycentric_rational<double> b(r.data(), mrV.data(), r.size());
+ boost::math::interpolators::barycentric_rational<double> b(r.data(), mrV.data(), r.size());
for (size_t i = 1; i < 8; ++i)
{
@@ -242,7 +242,7 @@
// start by creating 2 ranges for the x and y values:
auto x_range = boost::adaptors::keys(r);
auto y_range = boost::adaptors::values(r);
- boost::math::barycentric_rational<double> b(x_range.begin(), x_range.end(), y_range.begin());
+ boost::math::interpolators::barycentric_rational<double> b(x_range.begin(), x_range.end(), y_range.begin());
//
// We'll use a lambda expression to provide the functor to our root finder, since we want
// the abscissa value that yields 3, not zero. We pass the functor b by value to the
diff --git a/doc/html/math_toolkit/conventions.html b/doc/html/math_toolkit/conventions.html
index 17177b15c..5b815d0c0 100644
--- a/doc/html/math_toolkit/conventions.html
+++ b/doc/html/math_toolkit/conventions.html
@@ -27,7 +27,7 @@
Document Conventions
This documentation aims to use of the following naming and formatting conventions.
diff --git a/doc/html/math_toolkit/dist_ref/dists/hypergeometric_dist.html b/doc/html/math_toolkit/dist_ref/dists/hypergeometric_dist.html
index 1426a6ea6..7b11aa984 100644
--- a/doc/html/math_toolkit/dist_ref/dists/hypergeometric_dist.html
+++ b/doc/html/math_toolkit/dist_ref/dists/hypergeometric_dist.html
@@ -41,7 +41,7 @@
typedef RealType value_type;
typedef Policy policy_type;
// Construct:
- hypergeometric_distribution(unsigned r, unsigned n, unsigned N);
+ hypergeometric_distribution(unsigned r, unsigned n, unsigned N); // r=defective/failures/success, n=trials/draws, N=total population.
// Accessors:
unsigned total()const;
unsigned defective()const;
@@ -128,6 +128,18 @@
Returns the number of objects n which are sampled
from the population N.
+ Both naming/symbol and order of parameters is confusing with no two implementations
+ the same! See Wolfram Mathematica Hypergeometric
+ Distribution and Wikipedia Hypergeometric
+ Distribution and Python scipy.stats.hypergeom.
+
-
+
diff --git a/doc/html/indexes/s01.html b/doc/html/indexes/s01.html
index 674fd20ff..ed5fcc865 100644
--- a/doc/html/indexes/s01.html
+++ b/doc/html/indexes/s01.html
@@ -24,7 +24,7 @@
#include <boost/math/interpolators/barycentric_rational.hpp>
-namespace boost{ namespace math{
+namespace boost{ namespace math{ namespace interpolators{
template<class Real>
class barycentric_rational
{
@@ -53,7 +53,7 @@
std::vector<Real>&& return_y();
};
-}}
+}}}
@@ -78,7 +78,7 @@
std::vector<double> x(500);
std::vector<double> y(500);
// populate x, y, then:
-boost::math::barycentric_rational<double> interpolant(std::move(x), std::move(y));
+boost::math::interpolators::barycentric_rational<double> interpolant(std::move(x), std::move(y));
boost::math::barycentric_rational<double> interpolant(std::move(x), std::move(y), 5);
+
boost::math::interpolators::barycentric_rational<double> interpolant(std::move(x), std::move(y), 5);
+
+
+
+![[Warning]](../../../../../../../doc/src/images/warning.png)
Warning
+
+
Non-member
@@ -218,7 +230,10 @@
We also sanity check our implementation against some spot values computed
using the online calculator here http://stattrek.com/Tables/Hypergeometric.aspx.
Finally we test accuracy against some high precision test data using this
- implementation and NTL::RR.
+ implementation and NTL::RR. Spot test values for moments (mean to kurtosis)
+ are from Mathematica Hypergeometric
+ Distribution and agree with an implementation of Wikipedia Hypergeometric
+ Distribution and Python scipy.stats.hypergeom.
- The CDF and its complement is calculated by directly summing the PDF's.
+ The CDF and its complement is calculated by directly summing the PDFs.
We start by deciding whether the CDF, or its complement, is likely to be
the smaller of the two and then calculate the PDF at k
(or k+1 if we're calculating the complement) and calculate
@@ -327,6 +342,22 @@
![]() |
+Note | +
|---|---|
+ The kurtosis formula above is not quite correct and kurtosis excess is + now calculated from Wolfram + Alpha hypergeometric distribution kurtosis. (The hypergeometric + distribution kurtosis excess is mentioned in Wolfram + Hypergeometric distribution but coyly only described as "the + kurtosis excess is given by a complicated expression."). + This has been found numerically equivalent to the Wikipedia + hypergeometric kurtosis excess formula. + |
| diff --git a/doc/html/math_toolkit/navigation.html b/doc/html/math_toolkit/navigation.html index dc305c118..7748e49df 100644 --- a/doc/html/math_toolkit/navigation.html +++ b/doc/html/math_toolkit/navigation.html @@ -27,7 +27,7 @@ Navigation |