mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
[CI SKIP]Editorial work using changes in math.css, part one.
This commit is contained in:
@@ -52,7 +52,7 @@ The [@http://en.wikipedia.org/wiki/Probability_density_function probability dens
|
||||
for the [@http://en.wikipedia.org/wiki/arcsine_distribution arcsine distribution]
|
||||
defined on the interval \[['x_min, x_max]\] is given by:
|
||||
|
||||
[figspace] [figspace] f(x; x_min, x_max) = 1 /([pi][sdot][sqrt]((x - x_min)[sdot](x_max - x_min))
|
||||
[expression f(x; x_min, x_max) = 1 /([pi][sdot][sqrt]((x - x_min)[sdot](x_max - x_min))]
|
||||
|
||||
For example, __WolframAlpha arcsine distribution, from input of
|
||||
|
||||
@@ -77,7 +77,7 @@ and some generalized examples with other ['x] ranges.
|
||||
|
||||
The Cumulative Distribution Function CDF is defined as
|
||||
|
||||
[:F(x) = 2[sdot]arcsin([sqrt]((x-x_min)/(x_max - x))) / [pi]]
|
||||
[expression F(x) = 2[sdot]arcsin([sqrt]((x-x_min)/(x_max - x))) / [pi]]
|
||||
|
||||
[graph arcsine_cdf]
|
||||
|
||||
@@ -137,7 +137,7 @@ and their appplication to solve stock market and other
|
||||
The random variate ['x] is constrained to ['x_min] and ['x_max], (for our 'standard' distribution, 0 and 1),
|
||||
and is usually some fraction. For any other ['x_min] and ['x_max] a fraction can be obtained from ['x] using
|
||||
|
||||
[sixemspace] fraction = (x - x_min) / (x_max - x_min)
|
||||
[expression fraction = (x - x_min) / (x_max - x_min)]
|
||||
|
||||
The simplest example is tossing heads and tails with a fair coin and modelling the risk of losing, or winning.
|
||||
Walkers (molecules, drunks...) moving left or right of a centre line are another common example.
|
||||
@@ -258,7 +258,7 @@ which was interpreted as
|
||||
|
||||
and produced the resulting expression
|
||||
|
||||
x = -a sin^2((pi p)/2)+a+b sin^2((pi p)/2)
|
||||
[expression x = -a sin^2((pi p)/2)+a+b sin^2((pi p)/2)]
|
||||
|
||||
Thanks to Wolfram for providing this facility.
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ This means the probability density\/mass function (pdf) is written as ['f(k; n,
|
||||
Translating this into code the `binomial_distribution` constructor
|
||||
therefore has two parameters:
|
||||
|
||||
binomial_distribution(RealType n, RealType p);
|
||||
binomial_distribution(RealType n, RealType p);
|
||||
|
||||
While the function `pdf` has one argument specifying the distribution type
|
||||
(which includes its parameters, if any),
|
||||
and a second argument for the __random_variate. So taking our binomial distribution
|
||||
example, we would write:
|
||||
|
||||
pdf(binomial_distribution<RealType>(n, p), k);
|
||||
pdf(binomial_distribution<RealType>(n, p), k);
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -72,7 +72,7 @@ describe how to change the rounding policy
|
||||
for these distributions.
|
||||
]
|
||||
|
||||
[endsect]
|
||||
[endsect] [/section:variates Random Variates and Distribution Parameters]
|
||||
|
||||
[/
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -34,9 +34,10 @@ sequences of independent Bernoulli trials can be based.
|
||||
The Bernoulli is the binomial distribution (k = 1, p) with only one trial.
|
||||
|
||||
[@http://en.wikipedia.org/wiki/Probability_density_function probability density function pdf]
|
||||
f(0) = 1 - p, f(1) = p.
|
||||
[expression f(0) = 1 - p, f(1) = p]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/Cumulative_Distribution_Function Cumulative distribution function]
|
||||
D(k) = if (k == 0) 1 - p else 1.
|
||||
[expression D(k) = if (k == 0) 1 - p else 1]
|
||||
|
||||
The following graph illustrates how the
|
||||
[@http://en.wikipedia.org/wiki/Probability_density_function probability density function pdf]
|
||||
|
||||
@@ -72,15 +72,15 @@ The [@http://en.wikipedia.org/wiki/Probability_density_function probability dens
|
||||
for the [@http://en.wikipedia.org/wiki/Beta_distribution beta distribution]
|
||||
defined on the interval \[0,1\] is given by:
|
||||
|
||||
f(x;[alpha],[beta]) = x[super[alpha] - 1] (1 - x)[super[beta] -1] / B([alpha], [beta])
|
||||
[expression f(x;[alpha],[beta]) = x[super[alpha] - 1] (1 - x)[super[beta] -1] / B([alpha], [beta])]
|
||||
|
||||
where B([alpha], [beta]) is the
|
||||
where [role serif_italic B([alpha], [beta])] is the
|
||||
[@http://en.wikipedia.org/wiki/Beta_function beta function],
|
||||
implemented in this library as __beta. Division by the beta function
|
||||
ensures that the pdf is normalized to the range zero to unity.
|
||||
|
||||
The following graph illustrates examples of the pdf for various values
|
||||
of the shape parameters. Note the [alpha] = [beta] = 2 (blue line)
|
||||
of the shape parameters. Note the ['[alpha] = [beta] = 2] (blue line)
|
||||
is dome-shaped, and might be approximated by a symmetrical triangular
|
||||
distribution.
|
||||
|
||||
@@ -228,11 +228,9 @@ In the following table /a/ and /b/ are the parameters [alpha] and [beta],
|
||||
|
||||
[table
|
||||
[[Function][Implementation Notes]]
|
||||
[[pdf]
|
||||
[f(x;[alpha],[beta]) = x[super[alpha] - 1] (1 - x)[super[beta] -1] / B([alpha], [beta])
|
||||
[[pdf][[role serif_italic f(x;[alpha],[beta]) = x[super[alpha] - 1] (1 - x)[super[beta] -1] / B([alpha], [beta])]
|
||||
|
||||
Implemented using __ibeta_derivative(a, b, x).]]
|
||||
|
||||
[[cdf][Using the incomplete beta function __ibeta(a, b, x)]]
|
||||
[[cdf complement][__ibetac(a, b, x)]]
|
||||
[[quantile][Using the inverse incomplete beta function __ibeta_inv(a, b, p)]]
|
||||
@@ -244,12 +242,8 @@ In the following table /a/ and /b/ are the parameters [alpha] and [beta],
|
||||
[[kurtosis excess][ [equation beta_dist_kurtosis] ]]
|
||||
[[kurtosis][`kurtosis + 3`]]
|
||||
[[parameter estimation][ ]]
|
||||
[[alpha
|
||||
|
||||
from mean and variance][`mean * (( (mean * (1 - mean)) / variance)- 1)`]]
|
||||
[[beta
|
||||
|
||||
from mean and variance][`(1 - mean) * (((mean * (1 - mean)) /variance)-1)`]]
|
||||
[[alpha (from mean and variance)][`mean * (( (mean * (1 - mean)) / variance)- 1)`]]
|
||||
[[beta (from mean and variance)][`(1 - mean) * (((mean * (1 - mean)) /variance)-1)`]]
|
||||
[[The member functions `find_alpha` and `find_beta`
|
||||
|
||||
from cdf and probability x
|
||||
@@ -260,7 +254,7 @@ In the following table /a/ and /b/ are the parameters [alpha] and [beta],
|
||||
__ibeta_inva, and __ibeta_invb respectively.]]
|
||||
[[`find_alpha`][`ibeta_inva(beta, x, probability)`]]
|
||||
[[`find_beta`][`ibeta_invb(alpha, x, probability)`]]
|
||||
]
|
||||
] [/table]
|
||||
|
||||
[h4 References]
|
||||
|
||||
@@ -270,7 +264,7 @@ __ibeta_inva, and __ibeta_invb respectively.]]
|
||||
|
||||
[@http://mathworld.wolfram.com/BetaDistribution.html Wolfram MathWorld]
|
||||
|
||||
[endsect][/section:beta_dist beta]
|
||||
[endsect] [/section:beta_dist beta]
|
||||
|
||||
[/ beta.qbk
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -130,8 +130,7 @@ best estimate for the success fraction is simply ['k/n], but if you
|
||||
want to be 95% sure that the true value is [*greater than] some value,
|
||||
['p[sub min]], then:
|
||||
|
||||
p``[sub min]`` = binomial_distribution<RealType>::find_lower_bound_on_p(
|
||||
n, k, 0.05);
|
||||
p``[sub min]`` = binomial_distribution<RealType>::find_lower_bound_on_p(n, k, 0.05);
|
||||
|
||||
[link math_toolkit.stat_tut.weg.binom_eg.binom_conf See worked example.]
|
||||
|
||||
@@ -210,8 +209,7 @@ best estimate for the success fraction is simply ['k/n], but if you
|
||||
want to be 95% sure that the true value is [*less than] some value,
|
||||
['p[sub max]], then:
|
||||
|
||||
p``[sub max]`` = binomial_distribution<RealType>::find_upper_bound_on_p(
|
||||
n, k, 0.05);
|
||||
p``[sub max]`` = binomial_distribution<RealType>::find_upper_bound_on_p(n, k, 0.05);
|
||||
|
||||
[link math_toolkit.stat_tut.weg.binom_eg.binom_conf See worked example.]
|
||||
|
||||
|
||||
@@ -321,7 +321,7 @@ less than 1 in 1000 chance of observing a component failure
|
||||
|
||||
[endsect] [/section:binom_size_eg Estimating Sample Sizes for a Binomial Distribution.]
|
||||
|
||||
[endsect][/section:binom_eg Binomial Distribution]
|
||||
[endsect] [/section:binom_eg Binomial Distribution]
|
||||
|
||||
[/
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -150,7 +150,7 @@ In the following table /v/ is the number of degrees of freedom of the distributi
|
||||
* [@http://mathworld.wolfram.com/Chi-SquaredDistribution.html Weisstein, Eric W. "Chi-Squared Distribution." From MathWorld--A Wolfram Web Resource.]
|
||||
|
||||
|
||||
[endsect][/section:chi_squared_dist Chi Squared]
|
||||
[endsect] [/section:chi_squared_dist Chi Squared]
|
||||
|
||||
[/ chi_squared.qbk
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -171,7 +171,7 @@ by placing a semi-colon or vertical bar)
|
||||
to separate the variate from the parameter(s) that defines the shape of the distribution.
|
||||
|
||||
For example, the binomial distribution probability distribution function (PDF) is written as
|
||||
['f(k| n, p)] = Pr(K = k|n, p) = probability of observing k successes out of n trials.
|
||||
[role serif_italic ['f(k| n, p)] = Pr(K = k|n, p) = ] probability of observing k successes out of n trials.
|
||||
K is the __random_variable, k is the __random_variate,
|
||||
the parameters are n (trials) and p (probability).
|
||||
] [/tip Random Variates and Distribution Parameters]
|
||||
|
||||
@@ -97,7 +97,7 @@ In the following table [lambda] is the parameter lambda of the distribution,
|
||||
Samuel Kotz & Saralees Nadarajah]
|
||||
discuss the relationship of the types of extreme value distributions.
|
||||
|
||||
[endsect][/section:exp_dist Exponential]
|
||||
[endsect] [/section:exp_dist Exponential]
|
||||
|
||||
[/ exponential.qbk
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -43,11 +43,11 @@ Samuel Kotz & Saralees Nadarajah].
|
||||
|
||||
The distribution has a PDF given by:
|
||||
|
||||
[:f(x) = (1/scale) e[super -(x-location)/scale] e[super -e[super -(x-location)/scale]]]
|
||||
[expression f(x) = (1/scale) e[super -(x-location)/scale] e[super -e[super -(x-location)/scale]]]
|
||||
|
||||
which in the standard case (scale = 1, location = 0) reduces to:
|
||||
|
||||
[:f(x) = e[super -x]e[super -e[super -x]]]
|
||||
[expression f(x) = e[super -x]e[super -e[super -x]]]
|
||||
|
||||
The following graph illustrates how the PDF varies with the location parameter:
|
||||
|
||||
@@ -108,7 +108,7 @@ In the following table:
|
||||
[[kurtosis excess][kurtosis - 3 or 12 / 5]]
|
||||
]
|
||||
|
||||
[endsect][/section:extreme_dist Extreme Value]
|
||||
[endsect] [/section:extreme_dist Extreme Value]
|
||||
|
||||
[/ extreme_value.qbk
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -50,7 +50,7 @@ The procedure begins by printing out a summary of our input data:
|
||||
The test statistic for an F-test is simply the ratio of the square of
|
||||
the two standard deviations:
|
||||
|
||||
[:F = s[sub 1][super 2] / s[sub 2][super 2]]
|
||||
[expression F = s[sub 1][super 2] / s[sub 2][super 2]]
|
||||
|
||||
where s[sub 1] is the standard deviation of the first sample and s[sub 2]
|
||||
is the standard deviation of the second sample. Or in code:
|
||||
@@ -83,9 +83,9 @@ critical value of the F distribution with degrees of freedom N1-1 and N2-1.
|
||||
|
||||
The upper and lower critical values can be computed using the quantile function:
|
||||
|
||||
[:F[sub (1-alpha; N1-1, N2-1)] = `quantile(fisher_f(N1-1, N2-1), alpha)`]
|
||||
[expression F[sub (1-alpha; N1-1, N2-1)] = `quantile(fisher_f(N1-1, N2-1), alpha)`]
|
||||
|
||||
[:F[sub (alpha; N1-1, N2-1)] = `quantile(complement(fisher_f(N1-1, N2-1), alpha))`]
|
||||
[expression F[sub (alpha; N1-1, N2-1)] = `quantile(complement(fisher_f(N1-1, N2-1), alpha))`]
|
||||
|
||||
In our example program we need both upper and lower critical values for alpha
|
||||
and for alpha/2:
|
||||
|
||||
@@ -28,8 +28,6 @@ for full source code & appended program output.
|
||||
|
||||
[endsect] [/section:find_eg Find Location and Scale Examples]
|
||||
|
||||
|
||||
|
||||
[/
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
|
||||
@@ -31,7 +31,7 @@ whether two samples have the same variance. If [chi][super 2][sub m][space] and
|
||||
[chi][super 2][sub n][space] are independent variates each distributed as
|
||||
Chi-Squared with /m/ and /n/ degrees of freedom, then the test statistic:
|
||||
|
||||
[:F[sub n,m][space] = ([chi][super 2][sub n][space] / n) / ([chi][super 2][sub m][space] / m)]
|
||||
[expression F[sub n,m][space] = ([chi][super 2][sub n][space] / n) / ([chi][super 2][sub m][space] / m)]
|
||||
|
||||
Is distributed over the range \[0, [infin]\] with an F distribution, and
|
||||
has the PDF:
|
||||
@@ -100,13 +100,13 @@ Direct differentiation of the CDF expressed in terms of the incomplete beta func
|
||||
|
||||
led to the following two formulas:
|
||||
|
||||
[:f[sub v1,v2](x) = y * __ibeta_derivative(v2 \/ 2, v1 \/ 2, v2 \/ (v2 + v1 * x))]
|
||||
[expression f[sub v1,v2](x) = y * __ibeta_derivative(v2 \/ 2, v1 \/ 2, v2 \/ (v2 + v1 * x))]
|
||||
|
||||
with y = (v2 * v1) \/ ((v2 + v1 * x) * (v2 + v1 * x))
|
||||
|
||||
and
|
||||
|
||||
[:f[sub v1,v2](x) = y * __ibeta_derivative(v1 \/ 2, v2 \/ 2, v1 * x \/ (v2 + v1 * x))]
|
||||
[expression f[sub v1,v2](x) = y * __ibeta_derivative(v1 \/ 2, v2 \/ 2, v1 * x \/ (v2 + v1 * x))]
|
||||
|
||||
with y = (z * v1 - x * v1 * v1) \/ z[super 2]
|
||||
|
||||
@@ -118,11 +118,11 @@ The aim is to keep the /x/ argument to __ibeta_derivative away from 1 to avoid
|
||||
rounding error. ]]
|
||||
[[cdf][Using the relations:
|
||||
|
||||
[:p = __ibeta(v1 \/ 2, v2 \/ 2, v1 * x \/ (v2 + v1 * x))]
|
||||
[expression p = __ibeta(v1 \/ 2, v2 \/ 2, v1 * x \/ (v2 + v1 * x))]
|
||||
|
||||
and
|
||||
|
||||
[:p = __ibetac(v2 \/ 2, v1 \/ 2, v2 \/ (v2 + v1 * x))]
|
||||
[expression :p = __ibetac(v2 \/ 2, v1 \/ 2, v2 \/ (v2 + v1 * x))]
|
||||
|
||||
The first is used for v1 * x > v2, otherwise the second is used.
|
||||
|
||||
@@ -131,11 +131,11 @@ avoid rounding error. ]]
|
||||
|
||||
[[cdf complement][Using the relations:
|
||||
|
||||
[:p = __ibetac(v1 \/ 2, v2 \/ 2, v1 * x \/ (v2 + v1 * x))]
|
||||
[expression p = __ibetac(v1 \/ 2, v2 \/ 2, v1 * x \/ (v2 + v1 * x))]
|
||||
|
||||
and
|
||||
|
||||
[:p = __ibeta(v2 \/ 2, v1 \/ 2, v2 \/ (v2 + v1 * x))]
|
||||
[expression p = __ibeta(v2 \/ 2, v1 \/ 2, v2 \/ (v2 + v1 * x))]
|
||||
|
||||
The first is used for v1 * x < v2, otherwise the second is used.
|
||||
|
||||
@@ -143,15 +143,15 @@ The aim is to keep the /x/ argument to __ibeta well away from 1 to
|
||||
avoid rounding error. ]]
|
||||
[[quantile][Using the relation:
|
||||
|
||||
[:x = v2 * a \/ (v1 * b)]
|
||||
[expression x = v2 * a \/ (v1 * b)]
|
||||
|
||||
where:
|
||||
|
||||
[:a = __ibeta_inv(v1 \/ 2, v2 \/ 2, p)]
|
||||
[expression a = __ibeta_inv(v1 \/ 2, v2 \/ 2, p)]
|
||||
|
||||
and
|
||||
|
||||
[:b = 1 - a]
|
||||
[expression b = 1 - a]
|
||||
|
||||
Quantities /a/ and /b/ are both computed by __ibeta_inv without the
|
||||
subtraction implied above.]]
|
||||
@@ -159,15 +159,15 @@ subtraction implied above.]]
|
||||
|
||||
from the complement][Using the relation:
|
||||
|
||||
[:x = v2 * a \/ (v1 * b)]
|
||||
[expression x = v2 * a \/ (v1 * b)]
|
||||
|
||||
where
|
||||
|
||||
[:a = __ibetac_inv(v1 \/ 2, v2 \/ 2, p)]
|
||||
[expression a = __ibetac_inv(v1 \/ 2, v2 \/ 2, p)]
|
||||
|
||||
and
|
||||
|
||||
[:b = 1 - a]
|
||||
[expression b = 1 - a]
|
||||
|
||||
Quantities /a/ and /b/ are both computed by __ibetac_inv without the
|
||||
subtraction implied above.]]
|
||||
@@ -180,7 +180,7 @@ subtraction implied above.]]
|
||||
Weisstein, Eric W. "F-Distribution." From MathWorld--A Wolfram Web Resource.] ]]
|
||||
]
|
||||
|
||||
[endsect][/section:f_dist F distribution]
|
||||
[endsect] [/section:f_dist F distribution]
|
||||
|
||||
[/ fisher.qbk
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -109,7 +109,7 @@ data for those functions for more information.
|
||||
[h4 Implementation]
|
||||
|
||||
In the following table /k/ is the shape parameter of the distribution,
|
||||
[theta][space] is its scale parameter, /x/ is the random variate, /p/ is the probability
|
||||
[theta] is its scale parameter, /x/ is the random variate, /p/ is the probability
|
||||
and /q = 1-p/.
|
||||
|
||||
[table
|
||||
@@ -127,7 +127,7 @@ and /q = 1-p/.
|
||||
[[kurtosis excess][6 / k ]]
|
||||
]
|
||||
|
||||
[endsect][/section:gamma_dist Gamma (and Erlang) Distribution]
|
||||
[endsect] [/section:gamma_dist Gamma (and Erlang) Distribution]
|
||||
|
||||
|
||||
[/
|
||||
|
||||
@@ -61,18 +61,17 @@ before the first success.
|
||||
(unlike another definition where the set of trials starts at one, sometimes named /shifted/).]
|
||||
The geometric distribution assumes that success_fraction /p/ is fixed for all /k/ trials.
|
||||
|
||||
The probability that there are /k/ failures before the first success is
|
||||
The probability that there are /k/ failures before the first success
|
||||
|
||||
__spaces Pr(Y=/k/) = (1-/p/)[super /k/]/p/
|
||||
[expression Pr(Y=/k/) = (1-/p/)[super /k/]/p/]
|
||||
|
||||
For example, when throwing a 6-face dice the success probability /p/ = 1/6 = 0.1666[recur][space].
|
||||
For example, when throwing a 6-face dice the success probability /p/ = 1/6 = 0.1666[recur].
|
||||
Throwing repeatedly until a /three/ appears,
|
||||
the probability distribution of the number of times /not-a-three/ is thrown
|
||||
is geometric.
|
||||
the probability distribution of the number of times /not-a-three/ is thrown is geometric.
|
||||
|
||||
Geometric distribution has the Probability Density Function PDF:
|
||||
|
||||
__spaces (1-/p/)[super /k/]/p/
|
||||
[expression (1-/p/)[super /k/]/p/]
|
||||
|
||||
The following graph illustrates how the PDF and CDF vary for three examples
|
||||
of the success fraction /p/,
|
||||
@@ -339,7 +338,7 @@ the expected number of failures using the quantile.
|
||||
[[`find_maximum_number_of_trials`][See __negative_binomial_distrib]]
|
||||
]
|
||||
|
||||
[endsect][/section:geometric_dist geometric]
|
||||
[endsect] [/section:geometric_dist geometric]
|
||||
|
||||
[/ geometric.qbk
|
||||
Copyright 2010 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -38,7 +38,7 @@ A second version has an implicit scale = 1/degrees of freedom and gives the 1st
|
||||
The 2nd Wikipedia inverse chi_squared distribution definition can be implemented
|
||||
by explicitly specifying a scale = 1.
|
||||
|
||||
Both definitions are also available in Wolfram Mathematica and in __R (geoR) with default scale = 1/degrees of freedom.
|
||||
Both definitions are also available in __Mathematica and in __R (geoR) with default scale = 1/degrees of freedom.
|
||||
|
||||
See
|
||||
|
||||
@@ -60,7 +60,7 @@ See also __inverse_gamma_distrib and __chi_squared_distrib.
|
||||
The inverse_chi_squared distribution is a special case of a inverse_gamma distribution
|
||||
with [nu] (degrees_of_freedom) shape ([alpha]) and scale ([beta]) where
|
||||
|
||||
__spaces [alpha]= [nu] /2 and [beta] = [frac12].
|
||||
[expression [alpha]= [nu] /2 and [beta] = [frac12]]
|
||||
|
||||
[note This distribution *does* provide the typedef:
|
||||
|
||||
@@ -75,20 +75,20 @@ or you can write `inverse_chi_squared my_invchisqr(2, 3);`]
|
||||
For degrees of freedom parameter [nu],
|
||||
the (*unscaled*) inverse chi_squared distribution is defined by the probability density function (PDF):
|
||||
|
||||
__spaces f(x;[nu]) = 2[super -[nu]/2] x[super -[nu]/2-1] e[super -1/2x] / [Gamma]([nu]/2)
|
||||
[expression f(x;[nu]) = 2[super -[nu]/2] x[super -[nu]/2-1] e[super -1/2x] / [Gamma]([nu]/2)]
|
||||
|
||||
and Cumulative Density Function (CDF)
|
||||
|
||||
__spaces F(x;[nu]) = [Gamma]([nu]/2, 1/2x) / [Gamma]([nu]/2)
|
||||
[expression F(x;[nu]) = [Gamma]([nu]/2, 1/2x) / [Gamma]([nu]/2)]
|
||||
|
||||
For degrees of freedom parameter [nu] and scale parameter [xi],
|
||||
the *scaled* inverse chi_squared distribution is defined by the probability density function (PDF):
|
||||
|
||||
__spaces f(x;[nu], [xi]) = ([xi][nu]/2)[super [nu]/2] e[super -[nu][xi]/2x] x[super -1-[nu]/2] / [Gamma]([nu]/2)
|
||||
[expression f(x;[nu], [xi]) = ([xi][nu]/2)[super [nu]/2] e[super -[nu][xi]/2x] x[super -1-[nu]/2] / [Gamma]([nu]/2)]
|
||||
|
||||
and Cumulative Density Function (CDF)
|
||||
|
||||
__spaces F(x;[nu], [xi]) = [Gamma]([nu]/2, [nu][xi]/2x) / [Gamma]([nu]/2)
|
||||
[expression F(x;[nu], [xi]) = [Gamma]([nu]/2, [nu][xi]/2x) / [Gamma]([nu]/2)]
|
||||
|
||||
The following graphs illustrate how the PDF and CDF of the inverse chi_squared distribution
|
||||
varies for a few values of parameters [nu] and [xi]:
|
||||
|
||||
@@ -33,7 +33,6 @@ See [@http://en.wikipedia.org/wiki/Inverse-gamma_distribution inverse gamma dist
|
||||
|
||||
See also __gamma_distrib.
|
||||
|
||||
|
||||
[note
|
||||
In spite of potential confusion with the inverse gamma function, this
|
||||
distribution *does* provide the typedef:
|
||||
@@ -49,11 +48,11 @@ or you can write `inverse_gamma my_ig(2, 3);`]
|
||||
For shape parameter [alpha] and scale parameter [beta], it is defined
|
||||
by the probability density function (PDF):
|
||||
|
||||
__spaces f(x;[alpha], [beta]) = [beta][super [alpha]] * (1/x) [super [alpha]+1] exp(-[beta]/x) / [Gamma]([alpha])
|
||||
[expression f(x;[alpha], [beta]) = [beta][super [alpha]] * (1/x) [super [alpha]+1] exp(-[beta]/x) / [Gamma]([alpha])]
|
||||
|
||||
and cumulative density function (CDF)
|
||||
|
||||
__spaces F(x;[alpha], [beta]) = [Gamma]([alpha], [beta]/x) / [Gamma]([alpha])
|
||||
[expression F(x;[alpha], [beta]) = [Gamma]([alpha], [beta]/x) / [Gamma]([alpha])]
|
||||
|
||||
The following graphs illustrate how the PDF and CDF of the inverse gamma distribution
|
||||
varies as the parameters vary:
|
||||
@@ -100,7 +99,7 @@ But in general, inverse_gamma results are accurate to a few epsilon,
|
||||
[h4 Implementation]
|
||||
|
||||
In the following table [alpha] is the shape parameter of the distribution,
|
||||
[alpha][space] is its scale parameter, /x/ is the random variate, /p/ is the probability
|
||||
[alpha] is its scale parameter, /x/ is the random variate, /p/ is the probability
|
||||
and /q = 1-p/.
|
||||
|
||||
[table
|
||||
@@ -118,7 +117,7 @@ and /q = 1-p/.
|
||||
[[kurtosis_excess][(30 * [alpha] - 66) / (([alpha]-3)*([alpha] - 4)) for [alpha] >4, else a __domain_error]]
|
||||
] [/table]
|
||||
|
||||
[endsect][/section:inverse_gamma_dist Inverse Gamma Distribution]
|
||||
[endsect] [/section:inverse_gamma_dist Inverse Gamma Distribution]
|
||||
|
||||
[/
|
||||
Copyright 2010 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -67,11 +67,11 @@ For mean parameters [mu] and scale (also called precision) parameter [lambda],
|
||||
and random variate x,
|
||||
the inverse_gaussian distribution is defined by the probability density function (PDF):
|
||||
|
||||
__spaces f(x;[mu], [lambda]) = [sqrt]([lambda]/2[pi]x[super 3]) e[super -[lambda](x-[mu])[sup2]/2[mu][sup2]x]
|
||||
[expression f(x;[mu], [lambda]) = [sqrt]([lambda]/2[pi]x[super 3]) e[super -[lambda](x-[mu])[sup2]/2[mu][sup2]x] ]
|
||||
|
||||
and Cumulative Density Function (CDF):
|
||||
|
||||
__spaces F(x;[mu], [lambda]) = [Phi]{[sqrt]([lambda]/x) (x/[mu]-1)} + e[super 2[mu]/[lambda]] [Phi]{-[sqrt]([lambda]/[mu]) (1+x/[mu])}
|
||||
[expression F(x;[mu], [lambda]) = [Phi]{[sqrt]([lambda]/x) (x/[mu]-1)} + e[super 2[mu]/[lambda]] [Phi]{-[sqrt]([lambda]/[mu]) (1+x/[mu])} ]
|
||||
|
||||
where [Phi] is the standard normal distribution CDF.
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ q <=0.5: x = [mu] - [sigma]*log( 2*q )
|
||||
|
||||
* M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions, 1972, p. 930.
|
||||
|
||||
[endsect][/section:laplace_dist laplace]
|
||||
[endsect] [/section:laplace_dist laplace]
|
||||
|
||||
[/
|
||||
Copyright 2008, 2009 John Maddock, Paul A. Bristow and M.A. (Thijs) van den Berg.
|
||||
|
||||
@@ -92,7 +92,8 @@ in such cases, only a low /absolute error/ can be guaranteed.
|
||||
[[variance][ ([pi]*s)[super 2] / 3]]
|
||||
]
|
||||
|
||||
[endsect]
|
||||
[endsect] [/section:logistic_dist Logistic Distribution]
|
||||
|
||||
|
||||
[/ logistic.qbk
|
||||
Copyright 2006, 2007 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -108,7 +108,7 @@ and /q = 1-p/.
|
||||
[[kurtosis excess][e[super 4s[super 2] ] + 2e[super 3s[super 2] ] + 3e[super 2s[super 2] ] - 6 ]]
|
||||
]
|
||||
|
||||
[endsect][/section:normal_dist Normal]
|
||||
[endsect] [/section:lognormal_dist Log Normal Distribution]
|
||||
|
||||
[/
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -33,11 +33,12 @@
|
||||
The noncentral beta distribution is a generalization of the __beta_distrib.
|
||||
|
||||
It is defined as the ratio
|
||||
X = [chi][sub m][super 2]([lambda]) \/ ([chi][sub m][super 2]([lambda])
|
||||
+ [chi][sub n][super 2])
|
||||
where [chi][sub m][super 2]([lambda]) is a noncentral [chi][super 2]
|
||||
[expression X = [chi][sub m][super 2]([lambda]) \/ ([chi][sub m][super 2]([lambda])
|
||||
+ [chi][sub n][super 2])]
|
||||
where [role serif_italic [chi][sub m][super 2]([lambda])]
|
||||
is a noncentral [role serif_italic [chi][super 2]]
|
||||
random variable with /m/ degrees of freedom, and [chi][sub n][super 2]
|
||||
is a central [chi][super 2] random variable with /n/ degrees of freedom.
|
||||
is a central [role serif_italic [chi][super 2] ] random variable with /n/ degrees of freedom.
|
||||
|
||||
This gives a PDF that can be expressed as a Poisson mixture
|
||||
of beta distribution PDFs:
|
||||
|
||||
@@ -39,18 +39,18 @@
|
||||
}} // namespaces
|
||||
|
||||
The noncentral chi-squared distribution is a generalization of the
|
||||
__chi_squared_distrib. If X[sub i] are [nu] independent, normally
|
||||
distributed random variables with means [mu][sub i] and variances
|
||||
[sigma][sub i][super 2], then the random variable
|
||||
__chi_squared_distrib. If ['X[sub i]] are /[nu]/ independent, normally
|
||||
distributed random variables with means /[mu][sub i]/ and variances
|
||||
['[sigma][sub i][super 2]], then the random variable
|
||||
|
||||
[equation nc_chi_squ_ref1]
|
||||
|
||||
is distributed according to the noncentral chi-squared distribution.
|
||||
|
||||
The noncentral chi-squared distribution has two parameters:
|
||||
[nu] which specifies the number of degrees of freedom
|
||||
(i.e. the number of X[sub i]), and [lambda] which is related to the
|
||||
mean of the random variables X[sub i] by:
|
||||
/[nu]/ which specifies the number of degrees of freedom
|
||||
(i.e. the number of ['X[sub i])], and [lambda] which is related to the
|
||||
mean of the random variables ['X[sub i]] by:
|
||||
|
||||
[equation nc_chi_squ_ref2]
|
||||
|
||||
@@ -205,7 +205,7 @@ This method uses the well known sum:
|
||||
|
||||
[equation nc_chi_squ_ref5]
|
||||
|
||||
Where P[sub a](x) is the incomplete gamma function.
|
||||
Where ['P[sub a](x)] is the incomplete gamma function.
|
||||
|
||||
The method starts at the [lambda]th term, which is where the Poisson weighting
|
||||
function achieves its maximum value, although this is not necessarily
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
The noncentral F distribution is a generalization of the __F_distrib.
|
||||
It is defined as the ratio
|
||||
|
||||
F = (X/v1) / (Y/v2)
|
||||
[expression F = (X/v1) / (Y/v2)]
|
||||
|
||||
where X is a noncentral [chi][super 2]
|
||||
random variable with /v1/ degrees of freedom and non-centrality parameter [lambda],
|
||||
@@ -43,7 +43,7 @@ This gives the following PDF:
|
||||
|
||||
[equation nc_f_ref1]
|
||||
|
||||
where L[sub a][super b](c) is a generalised Laguerre polynomial and B(a,b) is the
|
||||
where ['L[sub a][super b](c)] is a generalised Laguerre polynomial and ['B(a,b)] is the
|
||||
__beta function, or
|
||||
|
||||
[equation nc_f_ref2]
|
||||
@@ -60,7 +60,7 @@ for different values of [lambda]:
|
||||
Constructs a non-central beta distribution with parameters /v1/ and /v2/
|
||||
and non-centrality parameter /lambda/.
|
||||
|
||||
Requires v1 > 0, v2 > 0 and lambda >= 0, otherwise calls __domain_error.
|
||||
Requires /v1/ > 0, /v2/ > 0 and lambda >= 0, otherwise calls __domain_error.
|
||||
|
||||
RealType degrees_of_freedom1()const;
|
||||
|
||||
@@ -104,43 +104,43 @@ is the non-centrality parameter,
|
||||
[[Function][Implementation Notes]]
|
||||
[[pdf][Implemented in terms of the non-central beta PDF using the relation:
|
||||
|
||||
f(x;v1,v2;[lambda]) = (v1\/v2) / ((1+y)*(1+y)) * g(y\/(1+y);v1\/2,v2\/2;[lambda])
|
||||
[role serif_italic f(x;v1,v2;[lambda]) = (v1\/v2) / ((1+y)*(1+y)) * g(y\/(1+y);v1\/2,v2\/2;[lambda])]
|
||||
|
||||
where g(x; a, b; [lambda]) is the non central beta PDF, and:
|
||||
|
||||
y = x * v1 \/ v2
|
||||
where [role serif_italic g(x; a, b; [lambda])] is the non central beta PDF, and:
|
||||
|
||||
[role serif_italic y = x * v1 \/ v2]
|
||||
]]
|
||||
[[cdf][Using the relation:
|
||||
|
||||
p = B[sub y](v1\/2, v2\/2; [lambda])
|
||||
[role serif_italic p = B[sub y](v1\/2, v2\/2; [lambda])]
|
||||
|
||||
where B[sub x](a, b; [lambda]) is the noncentral beta distribution CDF and
|
||||
where [role serif_italic B[sub x](a, b; [lambda])] is the noncentral beta distribution CDF and
|
||||
|
||||
y = x * v1 \/ v2
|
||||
[role serif_italic y = x * v1 \/ v2]
|
||||
|
||||
]]
|
||||
|
||||
[[cdf complement][Using the relation:
|
||||
|
||||
q = 1 - B[sub y](v1\/2, v2\/2; [lambda])
|
||||
[role serif_italic q = 1 - B[sub y](v1\/2, v2\/2; [lambda])]
|
||||
|
||||
where 1 - B[sub x](a, b; [lambda]) is the complement of the
|
||||
where [role serif_italic 1 - B[sub x](a, b; [lambda])] is the complement of the
|
||||
noncentral beta distribution CDF and
|
||||
|
||||
y = x * v1 \/ v2
|
||||
[role serif_italic y = x * v1 \/ v2]
|
||||
|
||||
]]
|
||||
[[quantile][Using the relation:
|
||||
|
||||
x = (bx \/ (1-bx)) * (v1 \/ v2)
|
||||
[role serif_italic x = (bx \/ (1-bx)) * (v1 \/ v2)]
|
||||
|
||||
where
|
||||
|
||||
bx = Q[sub p][super -1](v1\/2, v2\/2; [lambda])
|
||||
[role serif_italic bx = Q[sub p][super -1](v1\/2, v2\/2; [lambda])]
|
||||
|
||||
and
|
||||
|
||||
Q[sub p][super -1](v1\/2, v2\/2; [lambda])
|
||||
[role serif_italic Q[sub p][super -1](v1\/2, v2\/2; [lambda])]
|
||||
|
||||
is the noncentral beta quantile.
|
||||
|
||||
@@ -150,18 +150,18 @@ is the noncentral beta quantile.
|
||||
from the complement][
|
||||
Using the relation:
|
||||
|
||||
x = (bx \/ (1-bx)) * (v1 \/ v2)
|
||||
[role serif_italic x = (bx \/ (1-bx)) * (v1 \/ v2)]
|
||||
|
||||
where
|
||||
|
||||
bx = QC[sub q][super -1](v1\/2, v2\/2; [lambda])
|
||||
[role serif_italic bx = QC[sub q][super -1](v1\/2, v2\/2; [lambda])]
|
||||
|
||||
and
|
||||
|
||||
QC[sub q][super -1](v1\/2, v2\/2; [lambda])
|
||||
[role serif_italic QC[sub q][super -1](v1\/2, v2\/2; [lambda])]
|
||||
|
||||
is the noncentral beta quantile from the complement.]]
|
||||
[[mean][v2 * (v1 + l) \/ (v1 * (v2 - 2))]]
|
||||
[[mean][[role serif_italic v2 * (v1 + l) \/ (v1 * (v2 - 2))]]]
|
||||
[[mode][By numeric maximalisation of the PDF.]]
|
||||
[[variance][Refer to, [@http://mathworld.wolfram.com/NoncentralF-Distribution.html
|
||||
Weisstein, Eric W. "Noncentral F-Distribution." From MathWorld--A Wolfram Web Resource.] ]]
|
||||
|
||||
@@ -31,18 +31,17 @@
|
||||
|
||||
The noncentral T distribution is a generalization of the __students_t_distrib.
|
||||
Let X have a normal distribution with mean [delta] and variance 1, and let
|
||||
[nu] S[super 2] have
|
||||
['[nu] S[super 2]] have
|
||||
a chi-squared distribution with degrees of freedom [nu]. Assume that
|
||||
X and S[super 2] are independent. The
|
||||
distribution of t[sub [nu]]([delta])=X/S is called a
|
||||
noncentral t distribution with degrees of freedom [nu] and noncentrality
|
||||
parameter [delta].
|
||||
X and S[super 2] are independent.
|
||||
The distribution of [role serif_italic t[sub [nu]]([delta])=X/S] is called a
|
||||
noncentral t distribution with degrees of freedom [nu] and noncentrality parameter [delta].
|
||||
|
||||
This gives the following PDF:
|
||||
|
||||
[equation nc_t_ref1]
|
||||
|
||||
where [sub 1]F[sub 1](a;b;x) is a confluent hypergeometric function.
|
||||
where [role serif_italic [sub 1]F[sub 1](a;b;x)] is a confluent hypergeometric function.
|
||||
|
||||
The following graph illustrates how the distribution changes
|
||||
for different values of [nu] and [delta]:
|
||||
|
||||
@@ -33,7 +33,7 @@ distribution: it is also known as the Gaussian Distribution.
|
||||
A normal distribution with mean zero and standard deviation one
|
||||
is known as the ['Standard Normal Distribution].
|
||||
|
||||
Given mean [mu][space]and standard deviation [sigma] it has the PDF:
|
||||
Given mean [mu] and standard deviation [sigma] it has the PDF:
|
||||
|
||||
[equation normal_ref1]
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ The [@http://en.wikipedia.org/wiki/pareto_distribution Pareto distribution]
|
||||
is a continuous distribution with the
|
||||
[@http://en.wikipedia.org/wiki/Probability_density_function probability density function (pdf)]:
|
||||
|
||||
[:f(x; [alpha], [beta]) = [alpha][beta][super [alpha]] / x[super [alpha]+ 1]]
|
||||
[expression f(x; [alpha], [beta]) = [alpha][beta][super [alpha]] / x[super [alpha]+ 1]]
|
||||
|
||||
For shape parameter [alpha][space] > 0, and scale parameter [beta][space] > 0.
|
||||
If x < [beta][space], the pdf is zero.
|
||||
For shape parameter [alpha] > 0, and scale parameter [beta] > 0.
|
||||
If x < [beta], the pdf is zero.
|
||||
|
||||
The [@http://mathworld.wolfram.com/ParetoDistribution.html Pareto distribution]
|
||||
often describes the larger compared to the smaller.
|
||||
@@ -46,10 +46,8 @@ And this graph illustrates how the PDF varies with the shape parameter [alpha]:
|
||||
|
||||
[graph pareto_pdf2]
|
||||
|
||||
|
||||
[h4 Related distributions]
|
||||
|
||||
|
||||
[h4 Member Functions]
|
||||
|
||||
pareto_distribution(RealType scale = 1, RealType shape = 1);
|
||||
@@ -110,7 +108,7 @@ and its complement /q = 1-p/.
|
||||
* Handbook of Statistical Distributions with Applications, K Krishnamoorthy, ISBN 1-58488-635-8, Chapter 23, pp 257 - 267.
|
||||
(Note the meaning of a and b is reversed in Wolfram and Krishnamoorthy).
|
||||
|
||||
[endsect][/section:pareto pareto]
|
||||
[endsect] [/section:pareto pareto]
|
||||
|
||||
[/
|
||||
Copyright 2006, 2009 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -92,6 +92,8 @@ In the following table [lambda][space] is the mean of the distribution,
|
||||
[[kurtosis excess][1/[lambda]]]
|
||||
]
|
||||
|
||||
[endsect] [/section:poisson_dist Poisson]
|
||||
|
||||
[/ poisson.qbk
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
@@ -99,5 +101,4 @@ In the following table [lambda][space] is the mean of the distribution,
|
||||
http://www.boost.org/LICENSE_1_0.txt).
|
||||
]
|
||||
|
||||
[endsect][/section:poisson_dist Poisson]
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ The [@http://en.wikipedia.org/wiki/Rayleigh_distribution Rayleigh distribution]
|
||||
is a continuous distribution with the
|
||||
[@http://en.wikipedia.org/wiki/Probability_density_function probability density function]:
|
||||
|
||||
[:f(x; sigma) = x * exp(-x[super 2]/2 [sigma][super 2]) / [sigma][super 2]]
|
||||
[expression f(x; sigma) = x * exp(-x[super 2]/2 [sigma][super 2]) / [sigma][super 2]]
|
||||
|
||||
For sigma parameter [sigma][space] > 0, and x > 0.
|
||||
For sigma parameter /[sigma]/ > 0, and /x/ > 0.
|
||||
|
||||
The Rayleigh distribution is often used where two orthogonal components
|
||||
have an absolute value,
|
||||
@@ -86,13 +86,13 @@ NTL RR type with 150-bit accuracy, about 50 decimal digits.
|
||||
|
||||
[h4 Implementation]
|
||||
|
||||
In the following table [sigma][space] is the sigma parameter of the distribution,
|
||||
In the following table [sigma] is the sigma parameter of the distribution,
|
||||
/x/ is the random variate, /p/ is the probability and /q = 1-p/.
|
||||
|
||||
[table
|
||||
[[Function][Implementation Notes]]
|
||||
[[pdf][Using the relation: pdf = x * exp(-x[super 2])/2 [sigma][super 2] ]]
|
||||
[[cdf][Using the relation: p = 1 - exp(-x[super 2]/2) [sigma][super 2][space] = -__expm1(-x[super 2]/2) [sigma][super 2]]]
|
||||
[[cdf][Using the relation: p = 1 - exp(-x[super 2]/2) [sigma][super 2]= -__expm1(-x[super 2]/2) [sigma][super 2]]]
|
||||
[[cdf complement][Using the relation: q = exp(-x[super 2]/ 2) * [sigma][super 2] ]]
|
||||
[[quantile][Using the relation: x = sqrt(-2 * [sigma] [super 2]) * log(1 - p)) = sqrt(-2 * [sigma] [super 2]) * __log1p(-p))]]
|
||||
[[quantile from the complement][Using the relation: x = sqrt(-2 * [sigma] [super 2]) * log(q)) ]]
|
||||
|
||||
@@ -42,12 +42,11 @@ Given N independent measurements, let
|
||||
|
||||
[equation students_t_dist]
|
||||
|
||||
where /M/ is the population mean, [' ''' μ '''] is the sample mean, and /s/ is the
|
||||
sample variance.
|
||||
where /M/ is the population mean, [mu] is the sample mean, and /s/ is the sample variance.
|
||||
|
||||
[@https://en.wikipedia.org/wiki/Student%27s_t-distribution Student's t-distribution]
|
||||
is defined as the distribution of the random
|
||||
variable t which is - very loosely - the "best" that we can do not
|
||||
variable t which is - very loosely - the "best" that we can do while not
|
||||
knowing the true standard deviation of the sample. It has the PDF:
|
||||
|
||||
[equation students_t_ref1]
|
||||
@@ -133,12 +132,12 @@ In the following table /v/ is the degrees of freedom of the distribution,
|
||||
|
||||
[table
|
||||
[[Function][Implementation Notes]]
|
||||
[[pdf][Using the relation: pdf = (v \/ (v + t[super 2]))[super (1+v)\/2 ] / (sqrt(v) * __beta(v\/2, 0.5)) ]]
|
||||
[[pdf][Using the relation: [role serif_italic pdf = (v \/ (v + t[super 2]))[super (1+v)\/2 ] / (sqrt(v) * __beta(v\/2, 0.5))] ]]
|
||||
[[cdf][Using the relations:
|
||||
|
||||
p = 1 - z /iff t > 0/
|
||||
[role serif_italic p = 1 - z /iff t > 0/]
|
||||
|
||||
p = z /otherwise/
|
||||
[role serif_italic p = z /otherwise/]
|
||||
|
||||
where z is given by:
|
||||
|
||||
@@ -146,13 +145,13 @@ __ibeta(v \/ 2, 0.5, v \/ (v + t[super 2])) \/ 2 ['iff v < 2t[super 2]]
|
||||
|
||||
__ibetac(0.5, v \/ 2, t[super 2 ] / (v + t[super 2]) \/ 2 /otherwise/]]
|
||||
[[cdf complement][Using the relation: q = cdf(-t) ]]
|
||||
[[quantile][Using the relation: t = sign(p - 0.5) * sqrt(v * y \/ x)
|
||||
[[quantile][Using the relation: [role serif_italic t = sign(p - 0.5) * sqrt(v * y \/ x)]
|
||||
|
||||
where:
|
||||
|
||||
x = __ibeta_inv(v \/ 2, 0.5, 2 * min(p, q))
|
||||
[role serif_italic x = __ibeta_inv(v \/ 2, 0.5, 2 * min(p, q)) ]
|
||||
|
||||
y = 1 - x
|
||||
[role serif_italic y = 1 - x]
|
||||
|
||||
The quantities /x/ and /y/ are both returned by __ibeta_inv
|
||||
without the subtraction implied above.]]
|
||||
|
||||
@@ -45,9 +45,9 @@ The [@http://en.wikipedia.org/wiki/Triangular_distribution triangular distributi
|
||||
is a distribution with the
|
||||
[@http://en.wikipedia.org/wiki/Probability_density_function probability density function]:
|
||||
|
||||
[:f(x) =]
|
||||
[:[:2(x-a)/(b-a) (c-a) [:for a <= x <= c]]]
|
||||
[:[:2(b-x)/(b-a) (b-c) [:for c < x <= b]]]
|
||||
[expression f(x) =]
|
||||
[expression[:2(x-a)/(b-a) (c-a) [:for a <= x <= c]]]
|
||||
[expression[:2(b-x)/(b-a) (b-c) [:for c < x <= b]]]
|
||||
|
||||
Parameter ['a] (lower) can be any finite value.
|
||||
Parameter ['b] (upper) can be any finite value > a (lower).
|
||||
|
||||
@@ -32,13 +32,13 @@ The [@http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29 continu
|
||||
is a distribution with the
|
||||
[@http://en.wikipedia.org/wiki/Probability_density_function probability density function]:
|
||||
|
||||
[:f(x) =]
|
||||
[:[: 1 / (upper - lower) for lower < x < upper]]
|
||||
[:[:zero for x < lower or x > upper]]
|
||||
[expression f(x) =]
|
||||
[expression 1 / (upper - lower) for lower < x < upper]
|
||||
[expression zero for x < lower or x > upper]
|
||||
|
||||
and in this implementation:
|
||||
|
||||
[:1 / (upper - lower) for x = lower or x = upper]
|
||||
[expression 1 / (upper - lower) for x = lower or x = upper]
|
||||
|
||||
The choice of x = lower or x = upper is made because statistical use of this distribution judged is most likely:
|
||||
the method of maximum likelihood uses this definition.
|
||||
@@ -121,7 +121,7 @@ b is the /upper/ parameter,
|
||||
* [@http://mathworld.wolfram.com/UniformDistribution.html Weisstein, Weisstein, Eric W. "Uniform Distribution." From MathWorld--A Wolfram Web Resource.]
|
||||
* [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda3662.htm]
|
||||
|
||||
[endsect][/section:uniform_dist Uniform]
|
||||
[endsect] [/section:uniform_dist Uniform]
|
||||
|
||||
[/
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
[section:weibull_dist Weibull Distribution]
|
||||
|
||||
|
||||
``#include <boost/math/distributions/weibull.hpp>``
|
||||
|
||||
namespace boost{ namespace math{
|
||||
@@ -31,32 +30,32 @@ is a continuous distribution
|
||||
with the
|
||||
[@http://en.wikipedia.org/wiki/Probability_density_function probability density function]:
|
||||
|
||||
[:f(x; [alpha], [beta]) = ([alpha]\/[beta]) * (x \/ [beta])[super [alpha] - 1] * e[super -(x\/[beta])[super [alpha]]]]
|
||||
[expression f(x; [alpha], [beta]) = ([alpha]\/[beta]) * (x \/ [beta])[super [alpha] - 1] * e[super -(x\/[beta])[super [alpha]]]]
|
||||
|
||||
For shape parameter [alpha] > 0, and scale parameter [beta] > 0, and x > 0.
|
||||
For shape parameter ['[alpha]] > 0, and scale parameter ['[beta]] > 0, and /x/ > 0.
|
||||
|
||||
The Weibull distribution is often used in the field of failure analysis;
|
||||
in particular it can mimic distributions where the failure rate varies over time.
|
||||
If the failure rate is:
|
||||
|
||||
* constant over time, then [alpha][space] = 1, suggests that items are failing from random events.
|
||||
* decreases over time, then [alpha][space] < 1, suggesting "infant mortality".
|
||||
* increases over time, then [alpha][space] > 1, suggesting "wear out" - more likely to fail as time goes by.
|
||||
* constant over time, then ['[alpha]] = 1, suggests that items are failing from random events.
|
||||
* decreases over time, then ['[alpha]] < 1, suggesting "infant mortality".
|
||||
* increases over time, then ['[alpha]] > 1, suggesting "wear out" - more likely to fail as time goes by.
|
||||
|
||||
The following graph illustrates how the PDF varies with the shape parameter [alpha]:
|
||||
The following graph illustrates how the PDF varies with the shape parameter ['[alpha]]:
|
||||
|
||||
[graph weibull_pdf1]
|
||||
|
||||
While this graph illustrates how the PDF varies with the scale parameter [beta]:
|
||||
While this graph illustrates how the PDF varies with the scale parameter ['[beta]]:
|
||||
|
||||
[graph weibull_pdf2]
|
||||
|
||||
[h4 Related distributions]
|
||||
|
||||
When [alpha][space] = 3, the
|
||||
When ['[alpha]] = 3, the
|
||||
[@http://en.wikipedia.org/wiki/Weibull_distribution Weibull distribution] appears similar to the
|
||||
[@http://en.wikipedia.org/wiki/Normal_distribution normal distribution].
|
||||
When [alpha][space] = 1, the Weibull distribution reduces to the
|
||||
When ['[alpha]] = 1, the Weibull distribution reduces to the
|
||||
[@http://en.wikipedia.org/wiki/Exponential_distribution exponential distribution].
|
||||
The relationship of the types of extreme value distributions, of which the Weibull is but one, is
|
||||
discussed by
|
||||
@@ -98,8 +97,8 @@ and as such should have very low error rates.
|
||||
[h4 Implementation]
|
||||
|
||||
|
||||
In the following table [alpha][space] is the shape parameter of the distribution,
|
||||
[beta][space] is its scale parameter, /x/ is the random variate, /p/ is the probability
|
||||
In the following table ['[alpha]] is the shape parameter of the distribution,
|
||||
['[beta]] is its scale parameter, /x/ is the random variate, /p/ is the probability
|
||||
and /q = 1-p/.
|
||||
|
||||
[table
|
||||
@@ -122,7 +121,7 @@ and /q = 1-p/.
|
||||
* [@http://mathworld.wolfram.com/WeibullDistribution.html Weisstein, Eric W. "Weibull Distribution." From MathWorld--A Wolfram Web Resource.]
|
||||
* [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda3668.htm Weibull in NIST Exploratory Data Analysis]
|
||||
|
||||
[endsect][/section:weibull Weibull]
|
||||
[endsect] [/section:weibull Weibull]
|
||||
|
||||
[/
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -126,7 +126,7 @@ This manual is also available in <a href="http://sourceforge.net/projects/boost/
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: August 07, 2019 at 14:09:37 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: August 09, 2019 at 11:49:38 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1978068"></a>Function Index</h2></div></div></div>
|
||||
<a name="id1974858"></a>Function Index</h2></div></div></div>
|
||||
<p><a class="link" href="s01.html#idx_id_0">1</a> <a class="link" href="s01.html#idx_id_1">2</a> <a class="link" href="s01.html#idx_id_2">4</a> <a class="link" href="s01.html#idx_id_5">A</a> <a class="link" href="s01.html#idx_id_6">B</a> <a class="link" href="s01.html#idx_id_7">C</a> <a class="link" href="s01.html#idx_id_8">D</a> <a class="link" href="s01.html#idx_id_9">E</a> <a class="link" href="s01.html#idx_id_10">F</a> <a class="link" href="s01.html#idx_id_11">G</a> <a class="link" href="s01.html#idx_id_12">H</a> <a class="link" href="s01.html#idx_id_13">I</a> <a class="link" href="s01.html#idx_id_14">J</a> <a class="link" href="s01.html#idx_id_15">K</a> <a class="link" href="s01.html#idx_id_16">L</a> <a class="link" href="s01.html#idx_id_17">M</a> <a class="link" href="s01.html#idx_id_18">N</a> <a class="link" href="s01.html#idx_id_19">O</a> <a class="link" href="s01.html#idx_id_20">P</a> <a class="link" href="s01.html#idx_id_21">Q</a> <a class="link" href="s01.html#idx_id_22">R</a> <a class="link" href="s01.html#idx_id_23">S</a> <a class="link" href="s01.html#idx_id_24">T</a> <a class="link" href="s01.html#idx_id_25">U</a> <a class="link" href="s01.html#idx_id_26">V</a> <a class="link" href="s01.html#idx_id_27">W</a> <a class="link" href="s01.html#idx_id_28">X</a> <a class="link" href="s01.html#idx_id_29">Y</a> <a class="link" href="s01.html#idx_id_30">Z</a></p>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt>
|
||||
@@ -150,11 +150,11 @@
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">apply_recurrence_relation_backward</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">apply_recurrence_relation_forward</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">area</span></p>
|
||||
@@ -835,7 +835,6 @@
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">D</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">Bernoulli Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/ellint/ellint_d.html" title="Elliptic Integral D - Legendre Form"><span class="index-entry-level-1">Elliptic Integral D - Legendre Form</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/ellint/ellint_intro.html" title="Elliptic Integral Overview"><span class="index-entry-level-1">Elliptic Integral Overview</span></a></p></li>
|
||||
</ul></div>
|
||||
@@ -3164,7 +3163,6 @@
|
||||
<p><span class="index-entry-level-0">support</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/sf_implementation.html" title="Additional Implementation Notes"><span class="index-entry-level-1">Additional Implementation Notes</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/double_exponential/de_exp_sinh.html" title="exp_sinh"><span class="index-entry-level-1">exp_sinh</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/nmp.html" title="Non-Member Properties"><span class="index-entry-level-1">Non-Member Properties</span></a></p></li>
|
||||
</ul></div>
|
||||
</li>
|
||||
@@ -3467,7 +3465,6 @@
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">variance</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/beta_dist.html" title="Beta Distribution"><span class="index-entry-level-1">Beta Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/stat_tut/weg/cs_eg/chi_sq_size.html" title="Estimating the Required Sample Sizes for a Chi-Square Test for the Standard Deviation"><span class="index-entry-level-1">Estimating the Required Sample Sizes for a Chi-Square Test for the Standard Deviation</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/geometric_dist.html" title="Geometric Distribution"><span class="index-entry-level-1">Geometric Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/stat_tut/weg/inverse_chi_squared_eg.html" title="Inverse Chi-Squared Distribution Bayes Example"><span class="index-entry-level-1">Inverse Chi-Squared Distribution Bayes Example</span></a></p></li>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id2005581"></a>Class Index</h2></div></div></div>
|
||||
<a name="id2001459"></a>Class Index</h2></div></div></div>
|
||||
<p><a class="link" href="s02.html#idx_id_36">A</a> <a class="link" href="s02.html#idx_id_37">B</a> <a class="link" href="s02.html#idx_id_38">C</a> <a class="link" href="s02.html#idx_id_39">D</a> <a class="link" href="s02.html#idx_id_40">E</a> <a class="link" href="s02.html#idx_id_41">F</a> <a class="link" href="s02.html#idx_id_42">G</a> <a class="link" href="s02.html#idx_id_43">H</a> <a class="link" href="s02.html#idx_id_44">I</a> <a class="link" href="s02.html#idx_id_47">L</a> <a class="link" href="s02.html#idx_id_48">M</a> <a class="link" href="s02.html#idx_id_49">N</a> <a class="link" href="s02.html#idx_id_50">O</a> <a class="link" href="s02.html#idx_id_51">P</a> <a class="link" href="s02.html#idx_id_52">Q</a> <a class="link" href="s02.html#idx_id_53">R</a> <a class="link" href="s02.html#idx_id_54">S</a> <a class="link" href="s02.html#idx_id_55">T</a> <a class="link" href="s02.html#idx_id_56">U</a> <a class="link" href="s02.html#idx_id_57">V</a> <a class="link" href="s02.html#idx_id_58">W</a></p>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt>
|
||||
@@ -37,7 +37,7 @@
|
||||
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">backward_recurrence_iterator</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">barycentric_rational</span></p>
|
||||
@@ -145,7 +145,7 @@
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">forward_recurrence_iterator</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">fvar</span></p>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id2007170"></a>Typedef Index</h2></div></div></div>
|
||||
<a name="id2004432"></a>Typedef Index</h2></div></div></div>
|
||||
<p><a class="link" href="s03.html#idx_id_67">A</a> <a class="link" href="s03.html#idx_id_68">B</a> <a class="link" href="s03.html#idx_id_69">C</a> <a class="link" href="s03.html#idx_id_70">D</a> <a class="link" href="s03.html#idx_id_71">E</a> <a class="link" href="s03.html#idx_id_72">F</a> <a class="link" href="s03.html#idx_id_73">G</a> <a class="link" href="s03.html#idx_id_74">H</a> <a class="link" href="s03.html#idx_id_75">I</a> <a class="link" href="s03.html#idx_id_78">L</a> <a class="link" href="s03.html#idx_id_80">N</a> <a class="link" href="s03.html#idx_id_81">O</a> <a class="link" href="s03.html#idx_id_82">P</a> <a class="link" href="s03.html#idx_id_84">R</a> <a class="link" href="s03.html#idx_id_85">S</a> <a class="link" href="s03.html#idx_id_86">T</a> <a class="link" href="s03.html#idx_id_87">U</a> <a class="link" href="s03.html#idx_id_88">V</a> <a class="link" href="s03.html#idx_id_89">W</a></p>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt>
|
||||
@@ -423,7 +423,7 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/octonion.html" title="Template Class octonion"><span class="index-entry-level-1">Template Class octonion</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/quat.html" title="Template Class quaternion"><span class="index-entry-level-1">Template Class quaternion</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/special_tut/special_tut_test.html" title="Testing"><span class="index-entry-level-1">Testing</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/triangular_dist.html" title="Triangular Distribution"><span class="index-entry-level-1">Triangular Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/uniform_dist.html" title="Uniform Distribution"><span class="index-entry-level-1">Uniform Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/weibull_dist.html" title="Weibull Distribution"><span class="index-entry-level-1">Weibull Distribution</span></a></p></li>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id2010382"></a>Macro Index</h2></div></div></div>
|
||||
<a name="id2004275"></a>Macro Index</h2></div></div></div>
|
||||
<p><a class="link" href="s04.html#idx_id_99">B</a> <a class="link" href="s04.html#idx_id_103">F</a></p>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id2014714"></a>Index</h2></div></div></div>
|
||||
<a name="id2010733"></a>Index</h2></div></div></div>
|
||||
<p><a class="link" href="s05.html#idx_id_124">1</a> <a class="link" href="s05.html#idx_id_125">2</a> <a class="link" href="s05.html#idx_id_126">4</a> <a class="link" href="s05.html#idx_id_127">5</a> <a class="link" href="s05.html#idx_id_128">7</a> <a class="link" href="s05.html#idx_id_129">A</a> <a class="link" href="s05.html#idx_id_130">B</a> <a class="link" href="s05.html#idx_id_131">C</a> <a class="link" href="s05.html#idx_id_132">D</a> <a class="link" href="s05.html#idx_id_133">E</a> <a class="link" href="s05.html#idx_id_134">F</a> <a class="link" href="s05.html#idx_id_135">G</a> <a class="link" href="s05.html#idx_id_136">H</a> <a class="link" href="s05.html#idx_id_137">I</a> <a class="link" href="s05.html#idx_id_138">J</a> <a class="link" href="s05.html#idx_id_139">K</a> <a class="link" href="s05.html#idx_id_140">L</a> <a class="link" href="s05.html#idx_id_141">M</a> <a class="link" href="s05.html#idx_id_142">N</a> <a class="link" href="s05.html#idx_id_143">O</a> <a class="link" href="s05.html#idx_id_144">P</a> <a class="link" href="s05.html#idx_id_145">Q</a> <a class="link" href="s05.html#idx_id_146">R</a> <a class="link" href="s05.html#idx_id_147">S</a> <a class="link" href="s05.html#idx_id_148">T</a> <a class="link" href="s05.html#idx_id_149">U</a> <a class="link" href="s05.html#idx_id_150">V</a> <a class="link" href="s05.html#idx_id_151">W</a> <a class="link" href="s05.html#idx_id_152">X</a> <a class="link" href="s05.html#idx_id_153">Y</a> <a class="link" href="s05.html#idx_id_154">Z</a></p>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt>
|
||||
@@ -434,11 +434,11 @@
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">apply_recurrence_relation_backward</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">apply_recurrence_relation_forward</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">arcsine</span></p>
|
||||
@@ -618,7 +618,7 @@
|
||||
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">backward_recurrence_iterator</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">Barycentric Rational Interpolation</span></p>
|
||||
@@ -651,7 +651,6 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">accuracy</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">bernoulli</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><span class="bold"><strong><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">bernoulli_distribution</span></a></strong></span></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">D</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">policy_type</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">skewness</span></a></p></li>
|
||||
@@ -738,7 +737,6 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/beta_dist.html" title="Beta Distribution"><span class="index-entry-level-1">ibeta_invb</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/beta_dist.html" title="Beta Distribution"><span class="index-entry-level-1">policy_type</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/beta_dist.html" title="Beta Distribution"><span class="index-entry-level-1">value_type</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/beta_dist.html" title="Beta Distribution"><span class="index-entry-level-1">variance</span></a></p></li>
|
||||
</ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
@@ -1195,6 +1193,7 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/sf_implementation.html" title="Additional Implementation Notes"><span class="index-entry-level-1">Additional Implementation Notes</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/main_faq.html" title="Boost.Math Frequently Asked Questions (FAQs)"><span class="index-entry-level-1">Boost.Math Frequently Asked Questions (FAQs)</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/config_macros.html#math_toolkit.config_macros.boost_math_macros" title="Table 1.11. Boost.Math Macros"><span class="index-entry-level-1">Boost.Math Macros</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/contact.html" title="Contact Info and Support"><span class="index-entry-level-1">Contact Info and Support</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/credits.html" title="Credits and Acknowledgements"><span class="index-entry-level-1">Credits and Acknowledgements</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/pol_ref/error_handling_policies.html" title="Error Handling Policies"><span class="index-entry-level-1">Error Handling Policies</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/logs_and_tables/logs.html" title="Error Logs For Error Rate Tables"><span class="index-entry-level-1">Error Logs For Error Rate Tables</span></a></p></li>
|
||||
@@ -1657,7 +1656,11 @@
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">Calculation of the Type of the Result</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/result_type.html" title="Calculation of the Type of the Result"><span class="index-entry-level-1">point</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/result_type.html" title="Calculation of the Type of the Result"><span class="index-entry-level-1">cpp_bin_float</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/result_type.html" title="Calculation of the Type of the Result"><span class="index-entry-level-1">multiprecision</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/result_type.html" title="Calculation of the Type of the Result"><span class="index-entry-level-1">point</span></a></p></li>
|
||||
</ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">called</span></p>
|
||||
@@ -2293,6 +2296,14 @@
|
||||
</ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">Contact Info and Support</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/contact.html" title="Contact Info and Support"><span class="index-entry-level-1">bug</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/contact.html" title="Contact Info and Support"><span class="index-entry-level-1">GIT</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/contact.html" title="Contact Info and Support"><span class="index-entry-level-1">Trac</span></a></p></li>
|
||||
</ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">Continued Fraction Evaluation</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/cf.html" title="Continued Fraction Evaluation"><span class="index-entry-level-1">complex</span></a></p></li>
|
||||
@@ -2390,6 +2401,7 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/root_comparison/root_n_comparison.html#math_toolkit.root_comparison.root_n_comparison.root_7" title="Table 9.4. 7th root(28) for float, double, long double and cpp_bin_float_50 types, using _X86_SSE2"><span class="index-entry-level-1">7th root(28) for float, double, long double and cpp_bin_float_50 types, using _X86_SSE2</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/autodiff.html" title="Automatic Differentiation"><span class="index-entry-level-1">Automatic Differentiation</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/main_faq.html" title="Boost.Math Frequently Asked Questions (FAQs)"><span class="index-entry-level-1">Boost.Math Frequently Asked Questions (FAQs)</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/result_type.html" title="Calculation of the Type of the Result"><span class="index-entry-level-1">Calculation of the Type of the Result</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/root_comparison/cbrt_comparison.html" title="Comparison of Cube Root Finding Algorithms"><span class="index-entry-level-1">Comparison of Cube Root Finding Algorithms</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/root_comparison/elliptic_comparison.html" title="Comparison of Elliptic Integral Root Finding Algoritghms"><span class="index-entry-level-1">Comparison of Elliptic Integral Root Finding Algoritghms</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/root_comparison/root_n_comparison.html" title="Comparison of Nth-root Finding Algorithms"><span class="index-entry-level-1">Comparison of Nth-root Finding Algorithms</span></a></p></li>
|
||||
@@ -2642,7 +2654,6 @@
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">D</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/bernoulli_dist.html" title="Bernoulli Distribution"><span class="index-entry-level-1">Bernoulli Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/ellint/ellint_d.html" title="Elliptic Integral D - Legendre Form"><span class="index-entry-level-1">Elliptic Integral D - Legendre Form</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/ellint/ellint_intro.html" title="Elliptic Integral Overview"><span class="index-entry-level-1">Elliptic Integral Overview</span></a></p></li>
|
||||
</ul></div>
|
||||
@@ -3856,7 +3867,7 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/lanczos.html" title="The Lanczos Approximation"><span class="index-entry-level-1">The Lanczos Approximation</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/remez.html" title="The Remez Method"><span class="index-entry-level-1">The Remez Method</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/quat_todo.html" title="To Do"><span class="index-entry-level-1">To Do</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/triangular_dist.html" title="Triangular Distribution"><span class="index-entry-level-1">Triangular Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/tutorial/templ.html" title="Use in template code"><span class="index-entry-level-1">Use in template code</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/high_precision/use_mpfr.html" title="Using With MPFR or GMP - High-Precision Floating-Point Library"><span class="index-entry-level-1">Using With MPFR or GMP - High-Precision Floating-Point Library</span></a></p></li>
|
||||
@@ -3871,7 +3882,6 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/double_exponential/de_exp_sinh.html" title="exp_sinh"><span class="index-entry-level-1">integration</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/double_exponential/de_overview.html" title="Overview"><span class="index-entry-level-1">Overview</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/double_exponential/de_exp_sinh.html" title="exp_sinh"><span class="index-entry-level-1">quadrature</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/double_exponential/de_exp_sinh.html" title="exp_sinh"><span class="index-entry-level-1">support</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/double_exponential/de_exp_sinh.html" title="exp_sinh"><span class="index-entry-level-1">value_type</span></a></p></li>
|
||||
</ul></div>
|
||||
</li>
|
||||
@@ -4304,7 +4314,7 @@
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">forward_recurrence_iterator</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li></ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">Fourier Integrals</span></p>
|
||||
@@ -4601,6 +4611,7 @@
|
||||
<p><span class="index-entry-level-0">GIT</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/main_faq.html" title="Boost.Math Frequently Asked Questions (FAQs)"><span class="index-entry-level-1">Boost.Math Frequently Asked Questions (FAQs)</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/contact.html" title="Contact Info and Support"><span class="index-entry-level-1">Contact Info and Support</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/history1.html" title="History and What's New"><span class="index-entry-level-1">History and What's New</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/hints.html" title="Other Hints and tips"><span class="index-entry-level-1">Other Hints and tips</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/signal_statistics.html" title="Signal Statistics"><span class="index-entry-level-1">Signal Statistics</span></a></p></li>
|
||||
@@ -6328,6 +6339,7 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/autodiff.html" title="Automatic Differentiation"><span class="index-entry-level-1">Automatic Differentiation</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/number_series/bernoulli_numbers.html" title="Bernoulli Numbers"><span class="index-entry-level-1">Bernoulli Numbers</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/main_faq.html" title="Boost.Math Frequently Asked Questions (FAQs)"><span class="index-entry-level-1">Boost.Math Frequently Asked Questions (FAQs)</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/result_type.html" title="Calculation of the Type of the Result"><span class="index-entry-level-1">Calculation of the Type of the Result</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/root_comparison/cbrt_comparison.html" title="Comparison of Cube Root Finding Algorithms"><span class="index-entry-level-1">Comparison of Cube Root Finding Algorithms</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/root_comparison/elliptic_comparison.html" title="Comparison of Elliptic Integral Root Finding Algoritghms"><span class="index-entry-level-1">Comparison of Elliptic Integral Root Finding Algoritghms</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/root_comparison/root_n_comparison.html" title="Comparison of Nth-root Finding Algorithms"><span class="index-entry-level-1">Comparison of Nth-root Finding Algorithms</span></a></p></li>
|
||||
@@ -8251,7 +8263,6 @@
|
||||
<p><span class="index-entry-level-0">support</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/sf_implementation.html" title="Additional Implementation Notes"><span class="index-entry-level-1">Additional Implementation Notes</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/double_exponential/de_exp_sinh.html" title="exp_sinh"><span class="index-entry-level-1">exp_sinh</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/nmp.html" title="Non-Member Properties"><span class="index-entry-level-1">Non-Member Properties</span></a></p></li>
|
||||
</ul></div>
|
||||
</li>
|
||||
@@ -8485,14 +8496,14 @@
|
||||
</ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">Tools For 3 Term Recurrence Relations</span></p>
|
||||
<p><span class="index-entry-level-0">Tools For 3-Term Recurrence Relations</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">apply_recurrence_relation_backward</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">apply_recurrence_relation_forward</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">backward_recurrence_iterator</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">expression</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">forward_recurrence_iterator</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">value_type</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">apply_recurrence_relation_backward</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">apply_recurrence_relation_forward</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">backward_recurrence_iterator</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">expression</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">forward_recurrence_iterator</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">value_type</span></a></p></li>
|
||||
</ul></div>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
@@ -8575,6 +8586,7 @@
|
||||
<p><span class="index-entry-level-0">Trac</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/main_faq.html" title="Boost.Math Frequently Asked Questions (FAQs)"><span class="index-entry-level-1">Boost.Math Frequently Asked Questions (FAQs)</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/contact.html" title="Contact Info and Support"><span class="index-entry-level-1">Contact Info and Support</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/history1.html" title="History and What's New"><span class="index-entry-level-1">History and What's New</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/lambert_w.html" title="Lambert W function"><span class="index-entry-level-1">Lambert W function</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/hints.html" title="Other Hints and tips"><span class="index-entry-level-1">Other Hints and tips</span></a></p></li>
|
||||
@@ -9029,7 +9041,7 @@
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/octonion.html" title="Template Class octonion"><span class="index-entry-level-1">Template Class octonion</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/quat.html" title="Template Class quaternion"><span class="index-entry-level-1">Template Class quaternion</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/special_tut/special_tut_test.html" title="Testing"><span class="index-entry-level-1">Testing</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3 Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3 Term Recurrence Relations</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/internals/recurrence.html" title="Tools For 3-Term Recurrence Relations"><span class="index-entry-level-1">Tools For 3-Term Recurrence Relations</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/triangular_dist.html" title="Triangular Distribution"><span class="index-entry-level-1">Triangular Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/uniform_dist.html" title="Uniform Distribution"><span class="index-entry-level-1">Uniform Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/weibull_dist.html" title="Weibull Distribution"><span class="index-entry-level-1">Weibull Distribution</span></a></p></li>
|
||||
@@ -9038,7 +9050,6 @@
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
<p><span class="index-entry-level-0">variance</span></p>
|
||||
<div class="index"><ul class="index" style="list-style-type: none; ">
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/beta_dist.html" title="Beta Distribution"><span class="index-entry-level-1">Beta Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/stat_tut/weg/cs_eg/chi_sq_size.html" title="Estimating the Required Sample Sizes for a Chi-Square Test for the Standard Deviation"><span class="index-entry-level-1">Estimating the Required Sample Sizes for a Chi-Square Test for the Standard Deviation</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/dist_ref/dists/geometric_dist.html" title="Geometric Distribution"><span class="index-entry-level-1">Geometric Distribution</span></a></p></li>
|
||||
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../math_toolkit/stat_tut/weg/inverse_chi_squared_eg.html" title="Inverse Chi-Squared Distribution Bayes Example"><span class="index-entry-level-1">Inverse Chi-Squared Distribution Bayes Example</span></a></p></li>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/internals/series_evaluation.html">Series Evaluation</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/internals/cf.html">Continued Fraction Evaluation</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/internals/recurrence.html">Tools For 3 Term Recurrence
|
||||
<dt><span class="section"><a href="math_toolkit/internals/recurrence.html">Tools For 3-Term Recurrence
|
||||
Relations</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/internals/tuples.html">Tuples</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/internals/minimax.html">Minimax Approximations
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
@import url('../../../../doc/src/boostbook.css');
|
||||
/* Contains the basic settings for BoostBook and used by Quickbook to docbook conversion. */
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2004 Joel de Guzman
|
||||
Copyright (c) 2004 Joel de Guzman http://spirit.sourceforge.net/
|
||||
Copyright (c) 2014 John Maddock
|
||||
http://spirit.sourceforge.net/
|
||||
|
||||
Copyright 2013 Niall Douglas additions for colors and alignment.
|
||||
Copyright 2013 Paul A. Bristow additions for more colors and alignments.
|
||||
Copyright 2019 Paul A. Bristow additions for more control of font etc.
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompany-
|
||||
ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
=============================================================================*/
|
||||
|
||||
This Cascading Style Sheet is used to override and add to the standard Boost
|
||||
CSS BoostBook for a particular library, for example Boost.Math and Boost.Multiprecision.
|
||||
|
||||
Visual Studio is recommended for editing this file
|
||||
because it checks syntax, does layout and provides help on options.
|
||||
|
||||
/*=============================================================================
|
||||
Program listings
|
||||
@@ -34,9 +39,9 @@ Program listings
|
||||
{
|
||||
font-size: 10pt;
|
||||
display: block;
|
||||
margin: 1pc 4% 0pc 4%;
|
||||
/* was margin: 1pc 4% 0pc 4%; */
|
||||
margin: 1pc 2% 0pc 2%;
|
||||
padding: 0.5pc 0.5pc 0.5pc 0.5pc;
|
||||
|
||||
}
|
||||
@media screen
|
||||
{
|
||||
@@ -128,6 +133,21 @@ span.gold { color: gold; }
|
||||
span.silver { color: silver; } /* lighter gray */
|
||||
span.gray { color: #808080; } /* light gray */
|
||||
|
||||
/* role for inline Unicode mathematical equations,
|
||||
making font an italic (as is conventional for equations)
|
||||
and a serif version of font (to match those generated using .mml to SVG or PNG)
|
||||
and a little bigger because the serif font appears smaller than the default sans serif fonts.
|
||||
Used, for example: [role serif_italic This is in serif font and italic].
|
||||
Used in turn by template for inline expressions to match equations as SVG or PNG images.
|
||||
|
||||
*/
|
||||
span.serif_italic {
|
||||
font-family: serif;
|
||||
font-style: italic;
|
||||
font-size: 115%;
|
||||
font-stretch: expanded;
|
||||
}
|
||||
|
||||
/* Custom indent of paragraphs to make equations look nicer.
|
||||
https://www.w3schools.com/tags/tag_blockquote.asp says
|
||||
"Most browsers will display the <blockquote> element with left and right margin 40px values: "
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
for non-uniformly spaced samples. It requires 𝑶(<span class="emphasis"><em>N</em></span>) time
|
||||
for construction, and 𝑶(<span class="emphasis"><em>N</em></span>) time for each evaluation. Linear
|
||||
time evaluation is not optimal; for instance the cubic B-spline can be evaluated
|
||||
in constant time. However, using the cubic B-spline requires uniformly spaced
|
||||
in constant time. However, using the cubic B-spline requires uniformly-spaced
|
||||
samples, which are not always available.
|
||||
</p>
|
||||
<p>
|
||||
@@ -123,11 +123,14 @@
|
||||
<p>
|
||||
A desirable property of any interpolator <span class="emphasis"><em>f</em></span> is that for
|
||||
all <span class="emphasis"><em>x</em></span><sub>min</sub> ≤ <span class="emphasis"><em>x</em></span> ≤ <span class="emphasis"><em>x</em></span><sub>max</sub>,
|
||||
<span class="emphasis"><em>y</em></span><sub>min</sub> ≤ <span class="emphasis"><em>f</em></span>(<span class="emphasis"><em>x</em></span>)
|
||||
≤ <span class="emphasis"><em>y</em></span><sub>max</sub>. <span class="emphasis"><em>This property does not hold for
|
||||
the barycentric rational interpolator.</em></span> However, unless you deliberately
|
||||
try to antagonize this interpolator (by, for instance, placing the final value
|
||||
far from all the rest), you will probably not fall victim to this problem.
|
||||
also <span class="emphasis"><em>y</em></span><sub>min</sub> ≤ <span class="emphasis"><em>f</em></span>(<span class="emphasis"><em>x</em></span>)
|
||||
≤ <span class="emphasis"><em>y</em></span><sub>max</sub>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="emphasis"><em>This property does not hold for the barycentric rational interpolator.</em></span>
|
||||
However, unless you deliberately try to antagonize this interpolator (by, for
|
||||
instance, placing the final value far from all the rest), you will probably
|
||||
not fall victim to this problem.
|
||||
</p>
|
||||
<p>
|
||||
The reference used for implementation of this algorithm is <a href="https://web.archive.org/save/_embed/http://www.mn.uio.no/math/english/people/aca/michaelf/papers/rational.pdf" target="_top">Barycentric
|
||||
@@ -147,7 +150,7 @@
|
||||
potential which is only known at non-equally samples data.
|
||||
</p>
|
||||
<p>
|
||||
If he'd only had the barycentric rational interpolant of boost::math!
|
||||
If he'd only had the barycentric rational interpolant of Boost.Math!
|
||||
</p>
|
||||
<p>
|
||||
References: Kohn, W., and N. Rostoker. "Solution of the Schrodinger equation
|
||||
@@ -185,9 +188,8 @@
|
||||
|
||||
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// The lithium potential is given in Kohn's paper, Table I,</span>
|
||||
<span class="comment">// we could equally use an unordered_map, a list of tuples or pairs,</span>
|
||||
<span class="comment">// or a 2-dimentional array equally easily:</span>
|
||||
<span class="comment">// The lithium potential is given in Kohn's paper, Table I.</span>
|
||||
<span class="comment">// (We could equally easily use an unordered_map, a list of tuples or pairs, or a 2-dimentional array).</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">r</span><span class="special">;</span>
|
||||
|
||||
<span class="identifier">r</span><span class="special">[</span><span class="number">0.02</span><span class="special">]</span> <span class="special">=</span> <span class="number">5.727</span><span class="special">;</span>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
library is if you want to use the <code class="computeroutput"><span class="keyword">extern</span>
|
||||
<span class="string">"C"</span></code> functions declared in
|
||||
<code class="computeroutput"><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">tr1</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>. To build this using Boost.Build, from
|
||||
a commandline boost-root directory issue a command like:
|
||||
a command-line boost-root directory issue a command like:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">toolset</span><span class="special">=</span><span class="identifier">gcc</span> <span class="special">--</span><span class="identifier">with</span><span class="special">-</span><span class="identifier">math</span> <span class="identifier">install</span>
|
||||
</pre>
|
||||
@@ -94,10 +94,11 @@
|
||||
Optionally the sources in <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">src</span><span class="special">/</span><span class="identifier">tr1</span></code>
|
||||
have support for using <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">src</span><span class="special">/</span><span class="identifier">tr1</span><span class="special">/</span><span class="identifier">pch</span><span class="special">.</span><span class="identifier">hpp</span></code> as a precompiled header <span class="emphasis"><em>if
|
||||
your compiler supports precompiled headers.</em></span> Note that normally this
|
||||
header is a do-nothing include: to activate the header so that it #includes
|
||||
everything required by all the sources you will need to define BOOST_BUILD_PCH_ENABLED
|
||||
on the command line, both when building the pre-compiled header and when building
|
||||
the sources. Boost.Build will do this automatically when appropriate.
|
||||
header is a do-nothing <code class="computeroutput"><span class="preprocessor">#include</span></code>
|
||||
to activate the header so that it #includes everything required by all the
|
||||
sources you will need to define BOOST_BUILD_PCH_ENABLED on the command line,
|
||||
both when building the pre-compiled header and when building the sources. Boost.Build
|
||||
will do this automatically when appropriate.
|
||||
</p>
|
||||
<h5>
|
||||
<a name="math_toolkit.building.h1"></a>
|
||||
@@ -124,23 +125,22 @@
|
||||
<p>
|
||||
You will also need to build and link to the Boost.Regex library for many of
|
||||
the tests: this can built from the command line by following the <a href="http://www.boost.org/doc/libs/release/more/getting_started/index.html" target="_top">getting
|
||||
started guide</a>, using a command such as:
|
||||
started guide</a>, using commands such as:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">toolset</span><span class="special">=</span><span class="identifier">gcc</span> <span class="special">--</span><span class="identifier">with</span><span class="special">-</span><span class="identifier">regex</span> <span class="identifier">install</span>
|
||||
</pre>
|
||||
<p>
|
||||
or
|
||||
or bjam toolset=clang --with-regex install or bjam toolset=gcc,clang --with-regex
|
||||
install or bjam toolset=msvc --with-regex --build-type=complete stage
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">toolset</span><span class="special">=</span><span class="identifier">msvc</span> <span class="special">--</span><span class="identifier">with</span><span class="special">-</span><span class="identifier">regex</span> <span class="special">--</span><span class="identifier">build</span><span class="special">-</span><span class="identifier">type</span><span class="special">=</span><span class="identifier">complete</span> <span class="identifier">stage</span>
|
||||
</pre>
|
||||
<p>
|
||||
depending on whether you are on Linux or Windows.
|
||||
</p>
|
||||
<p>
|
||||
Many of the tests have optional precompiled header support using the header
|
||||
<code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">pch</span><span class="special">.</span><span class="identifier">hpp</span></code>. Note that normally this header is a
|
||||
do-nothing include: to activate the header so that it #includes everything
|
||||
required by all the sources you will need to define BOOST_BUILD_PCH_ENABLED
|
||||
do-nothing include: to activate the header so that it <code class="computeroutput"><span class="preprocessor">#include</span></code>s
|
||||
everything required by all the sources you will need to define BOOST_BUILD_PCH_ENABLED
|
||||
on the command line, both when building the pre-compiled header and when building
|
||||
the sources. Boost.Build will do this automatically when appropriate.
|
||||
</p>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<span class="keyword">class</span> <span class="identifier">cardinal_quadratic_b_spline</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">public</span><span class="special">:</span>
|
||||
<span class="comment">// If you don't know the value of the derivative at the endpoints, leave them as nans and the routine will estimate them.</span>
|
||||
<span class="comment">// If you don't know the value of the derivative at the endpoints, leave them as NaNs and the routine will estimate them.</span>
|
||||
<span class="comment">// y[0] = y(a), y[n - 1] = y(b), step_size = (b - a)/(n -1).</span>
|
||||
<span class="identifier">cardinal_quadratic_b_spline</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Real</span><span class="special">*</span> <span class="keyword">const</span> <span class="identifier">y</span><span class="special">,</span>
|
||||
<span class="identifier">size_t</span> <span class="identifier">n</span><span class="special">,</span>
|
||||
@@ -75,7 +75,7 @@
|
||||
Since the basis functions are less smooth than the cubic B-spline, you will
|
||||
nearly always wish to use the cubic B-spline interpolator rather than this.
|
||||
However, this interpolator is occasionally useful for approximating functions
|
||||
of reduced smoothness, as hence finds a uses internally in the Boost.Math library.
|
||||
of reduced smoothness, as hence finds use internally in the Boost.Math library.
|
||||
</p>
|
||||
<p>
|
||||
It is reasonable to test this interpolator against the cubic b-spline interpolator
|
||||
|
||||
@@ -75,15 +75,15 @@
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Interpolation of control points-this means the curve passes through the
|
||||
control points. Many curves (such as Bezier) are <span class="emphasis"><em>approximating</em></span>-they
|
||||
do not pass through their control points. This makes them more difficult
|
||||
control points. Many curves (such as Bézier) are <span class="emphasis"><em>approximating</em></span>
|
||||
- they do not pass through their control points. This makes them more difficult
|
||||
to use than interpolating splines.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
The <code class="computeroutput"><span class="identifier">catmull_rom</span></code> class provided
|
||||
by Boost creates a cubic Catmull-Rom spline from an array of points in any
|
||||
dimension. Since there are numerous ways to represent a point in <span class="emphasis"><em>n</em></span>-dimensional
|
||||
by Boost.Math creates a cubic Catmull-Rom spline from an array of points in
|
||||
any dimension. Since there are numerous ways to represent a point in <span class="emphasis"><em>n</em></span>-dimensional
|
||||
space, the class attempts to be flexible by templating on the point type. The
|
||||
requirements on the point type are discussing in more detail below, but roughly,
|
||||
it must have a dereference operator defined (e.g., <code class="computeroutput"><span class="identifier">p</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code>
|
||||
@@ -296,7 +296,8 @@
|
||||
then no problems arise; there are no reallocs, and in practice this condition
|
||||
is almost always satisfied. However, if <code class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special"><</span> <span class="identifier">v</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span>
|
||||
<span class="special">+</span> <span class="number">3</span></code>,
|
||||
the realloc causes a performance penalty of roughly 20%.
|
||||
the <code class="computeroutput"><span class="identifier">realloc</span></code> causes a performance
|
||||
penalty of roughly 20%.
|
||||
</p>
|
||||
<h4>
|
||||
<a name="math_toolkit.catmull_rom.h6"></a>
|
||||
|
||||
@@ -27,7 +27,17 @@
|
||||
<a name="math_toolkit.contact"></a><a class="link" href="contact.html" title="Contact Info and Support">Contact Info and Support</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
The main support for this library is via the Boost mailing lists:
|
||||
The main place to see and raise issues is now at <a href="%40https://github.com/boostorg/math/" target="_top">GIThub</a>.
|
||||
Currently open bug reports can be viewed <a href="https://github.com/boostorg/math/issues" target="_top">here</a>.
|
||||
</p>
|
||||
<p>
|
||||
All old bug reports, including closed ones, can be viewed on Trac (now read-only)
|
||||
<a href="https://svn.boost.org/trac/boost/query?status=assigned&status=closed&status=new&status=reopened&component=math&col=id&col=summary&col=status&col=type&col=milestone&col=component&order=priority" target="_top">here</a>
|
||||
and more recent issues on GIThub <a href="https://github.com/boostorg/math/issues?utf8=%E2%9C%93&q=is%3Aissue" target="_top">here</a>.
|
||||
</p>
|
||||
<p>
|
||||
The other places for discussion about this library are via the Boost mailing
|
||||
lists:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<a name="math_toolkit.conventions"></a><a class="link" href="conventions.html" title="Document Conventions">Document Conventions</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
<a class="indexterm" name="id1007686"></a>
|
||||
<a class="indexterm" name="id1001310"></a>
|
||||
</p>
|
||||
<p>
|
||||
This documentation aims to use of the following naming and formatting conventions.
|
||||
|
||||
@@ -91,10 +91,10 @@
|
||||
</p>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
The start of the functions domain
|
||||
The start of the functions domain,
|
||||
</li>
|
||||
<li class="listitem">
|
||||
The step size
|
||||
The step size.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
@@ -166,9 +166,10 @@
|
||||
<span class="phrase"><a name="math_toolkit.cubic_b.testing"></a></span><a class="link" href="cubic_b.html#math_toolkit.cubic_b.testing">Testing</a>
|
||||
</h4>
|
||||
<p>
|
||||
Since the interpolant obeys <span class="emphasis"><em>s(x<sub>j</sub>) = f(x<sub>j</sub>)</em></span> at all interpolation
|
||||
points, the tests generate random data and evaluate the interpolant at the
|
||||
interpolation points, validating that equality with the data holds.
|
||||
Since the interpolant obeys <span class="serif_italic">s(x<sub>j</sub>) = f(x<sub>j</sub>)</span>
|
||||
at all interpolation points, the tests generate random data and evaluate the
|
||||
interpolant at the interpolation points, validating that equality with the
|
||||
data holds.
|
||||
</p>
|
||||
<p>
|
||||
In addition, constant, linear, and quadratic functions are interpolated to
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
to use higher precision types like <a href="http://shoup.net/ntl/doc/RR.txt" target="_top">NTL::RR</a>,
|
||||
<a href="http://gmplib.org/" target="_top">GNU Multiple Precision Arithmetic Library</a>,
|
||||
<a href="http://www.mpfr.org/" target="_top">GNU MPFR library</a>, <a href="../../../../../libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>
|
||||
like cpp_bin_float_50 that conform to the requirements specified by real_concept.
|
||||
like cpp_bin_float_50 that conform to the requirements specified by
|
||||
<code class="computeroutput"><span class="identifier">real_concept</span></code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">/constants/</span></dt>
|
||||
<dd><p>
|
||||
|
||||
@@ -82,9 +82,10 @@
|
||||
distribution</a> defined on the interval [<span class="emphasis"><em>x_min, x_max</em></span>]
|
||||
is given by:
|
||||
</p>
|
||||
<p>
|
||||
    f(x; x_min, x_max) = 1 /(π⋅√((x - x_min)⋅(x_max - x_min))
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">f(x; x_min, x_max) = 1 /(π⋅√((x - x_min)⋅(x_max
|
||||
- x_min))</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
For example, <a href="http://www.wolframalpha.com/" target="_top">Wolfram Alpha</a>
|
||||
arcsine distribution, from input of
|
||||
@@ -121,7 +122,8 @@
|
||||
The Cumulative Distribution Function CDF is defined as
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
F(x) = 2⋅arcsin(√((x-x_min)/(x_max - x))) / π
|
||||
<span class="serif_italic">F(x) = 2⋅arcsin(√((x-x_min)/(x_max - x))) /
|
||||
π</span>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../graphs/arcsine_cdf.svg" align="middle"></span>
|
||||
@@ -236,9 +238,9 @@
|
||||
and <span class="emphasis"><em>x_max</em></span> a fraction can be obtained from <span class="emphasis"><em>x</em></span>
|
||||
using
|
||||
</p>
|
||||
<p>
|
||||
  fraction = (x - x_min) / (x_max - x_min)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">fraction = (x - x_min) / (x_max - x_min)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The simplest example is tossing heads and tails with a fair coin and modelling
|
||||
the risk of losing, or winning. Walkers (molecules, drunks...) moving left
|
||||
@@ -572,8 +574,9 @@
|
||||
<p>
|
||||
and produced the resulting expression
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">x</span> <span class="special">=</span> <span class="special">-</span><span class="identifier">a</span> <span class="identifier">sin</span><span class="special">^</span><span class="number">2</span><span class="special">((</span><span class="identifier">pi</span> <span class="identifier">p</span><span class="special">)/</span><span class="number">2</span><span class="special">)+</span><span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span> <span class="identifier">sin</span><span class="special">^</span><span class="number">2</span><span class="special">((</span><span class="identifier">pi</span> <span class="identifier">p</span><span class="special">)/</span><span class="number">2</span><span class="special">)</span>
|
||||
</pre>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">x = -a sin^2((pi p)/2)+a+b sin^2((pi p)/2)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
Thanks to Wolfram for providing this facility.
|
||||
</p>
|
||||
|
||||
@@ -64,9 +64,18 @@
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://en.wikipedia.org/wiki/Probability_density_function" target="_top">probability
|
||||
density function pdf</a> f(0) = 1 - p, f(1) = p. <a href="http://en.wikipedia.org/wiki/Cumulative_Distribution_Function" target="_top">Cumulative
|
||||
distribution function</a> D(k) = if (k == 0) 1 - p else 1.
|
||||
density function pdf</a>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">f(0) = 1 - p, f(1) = p</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
<a href="http://en.wikipedia.org/wiki/Cumulative_Distribution_Function" target="_top">Cumulative
|
||||
distribution function</a>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">D(k) = if (k == 0) 1 - p else 1</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The following graph illustrates how the <a href="http://en.wikipedia.org/wiki/Probability_density_function" target="_top">probability
|
||||
density function pdf</a> varies with the outcome of the single trial:
|
||||
|
||||
@@ -101,19 +101,19 @@
|
||||
density function PDF</a> for the <a href="http://en.wikipedia.org/wiki/Beta_distribution" target="_top">beta
|
||||
distribution</a> defined on the interval [0,1] is given by:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">f(x;α,β) = x<sup>α - 1</sup> (1 - x)<sup>β -1</sup> / B(α, β)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
f(x;α,β) = x<sup>α - 1</sup> (1 - x)<sup>β -1</sup> / B(α, β)
|
||||
</p>
|
||||
<p>
|
||||
where B(α, β) is the <a href="http://en.wikipedia.org/wiki/Beta_function" target="_top">beta
|
||||
where <span class="serif_italic">B(α, β)</span> is the <a href="http://en.wikipedia.org/wiki/Beta_function" target="_top">beta
|
||||
function</a>, implemented in this library as <a class="link" href="../../sf_beta/beta_function.html" title="Beta">beta</a>.
|
||||
Division by the beta function ensures that the pdf is normalized to the
|
||||
range zero to unity.
|
||||
</p>
|
||||
<p>
|
||||
The following graph illustrates examples of the pdf for various values
|
||||
of the shape parameters. Note the α = β = 2 (blue line) is dome-shaped, and
|
||||
might be approximated by a symmetrical triangular distribution.
|
||||
of the shape parameters. Note the <span class="emphasis"><em>α = β = 2</em></span> (blue line)
|
||||
is dome-shaped, and might be approximated by a symmetrical triangular distribution.
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../graphs/beta_pdf.svg" align="middle"></span>
|
||||
@@ -344,7 +344,7 @@ from presumed-known mean and variance.
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
f(x;α,β) = x<sup>α - 1</sup> (1 - x)<sup>β -1</sup> / B(α, β)
|
||||
<span class="serif_italic">f(x;α,β) = x<sup>α - 1</sup> (1 - x)<sup>β -1</sup> / B(α, β)</span>
|
||||
</p>
|
||||
<p>
|
||||
Implemented using <a class="link" href="../../sf_beta/beta_derivative.html" title="Derivative of the Incomplete Beta Function">ibeta_derivative</a>(a,
|
||||
@@ -499,10 +499,7 @@ from presumed-known mean and variance.
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
alpha
|
||||
</p>
|
||||
<p>
|
||||
from mean and variance
|
||||
alpha (from mean and variance)
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -519,10 +516,7 @@ from presumed-known mean and variance.
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
beta
|
||||
</p>
|
||||
<p>
|
||||
from mean and variance
|
||||
beta (from mean and variance)
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -240,8 +240,7 @@
|
||||
but if you want to be 95% sure that the true value is <span class="bold"><strong>greater
|
||||
than</strong></span> some value, <span class="emphasis"><em>p<sub>min</sub></em></span>, then:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">p</span><sub>min</sub> <span class="special">=</span> <span class="identifier">binomial_distribution</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">>::</span><span class="identifier">find_lower_bound_on_p</span><span class="special">(</span>
|
||||
<span class="identifier">n</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="number">0.05</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">p</span><sub>min</sub> <span class="special">=</span> <span class="identifier">binomial_distribution</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">>::</span><span class="identifier">find_lower_bound_on_p</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="number">0.05</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<a class="link" href="../../stat_tut/weg/binom_eg/binom_conf.html" title="Calculating Confidence Limits on the Frequency of Occurrence for a Binomial Distribution">See worked
|
||||
@@ -346,8 +345,7 @@
|
||||
but if you want to be 95% sure that the true value is <span class="bold"><strong>less
|
||||
than</strong></span> some value, <span class="emphasis"><em>p<sub>max</sub></em></span>, then:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">p</span><sub>max</sub> <span class="special">=</span> <span class="identifier">binomial_distribution</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">>::</span><span class="identifier">find_upper_bound_on_p</span><span class="special">(</span>
|
||||
<span class="identifier">n</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="number">0.05</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">p</span><sub>max</sub> <span class="special">=</span> <span class="identifier">binomial_distribution</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">>::</span><span class="identifier">find_upper_bound_on_p</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="number">0.05</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<a class="link" href="../../stat_tut/weg/binom_eg/binom_conf.html" title="Calculating Confidence Limits on the Frequency of Occurrence for a Binomial Distribution">See worked
|
||||
|
||||
@@ -73,13 +73,13 @@
|
||||
The distribution has a PDF given by:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f(x) = (1/scale) e<sup>-(x-location)/scale</sup> e<sup>-e<sup>-(x-location)/scale</sup></sup>
|
||||
<span class="serif_italic">f(x) = (1/scale) e<sup>-(x-location)/scale</sup> e<sup>-e<sup>-(x-location)/scale</sup></sup></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
which in the standard case (scale = 1, location = 0) reduces to:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f(x) = e<sup>-x</sup>e<sup>-e<sup>-x</sup></sup>
|
||||
<span class="serif_italic">f(x) = e<sup>-x</sup>e<sup>-e<sup>-x</sup></sup></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The following graph illustrates how the PDF varies with the location parameter:
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<span class="emphasis"><em>n</em></span> degrees of freedom, then the test statistic:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
F<sub>n,m</sub>   = (χ<sup>2</sup><sub>n</sub>   / n) / (χ<sup>2</sup><sub>m</sub>   / m)
|
||||
<span class="serif_italic">F<sub>n,m</sub>   = (χ<sup>2</sup><sub>n</sub>   / n) / (χ<sup>2</sup><sub>m</sub>   / m)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
Is distributed over the range [0, ∞] with an F distribution, and has the
|
||||
@@ -192,8 +192,8 @@
|
||||
led to the following two formulas:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f<sub>v1,v2</sub>(x) = y * <a class="link" href="../../sf_beta/beta_derivative.html" title="Derivative of the Incomplete Beta Function">ibeta_derivative</a>(v2
|
||||
/ 2, v1 / 2, v2 / (v2 + v1 * x))
|
||||
<span class="serif_italic">f<sub>v1,v2</sub>(x) = y * <a class="link" href="../../sf_beta/beta_derivative.html" title="Derivative of the Incomplete Beta Function">ibeta_derivative</a>(v2
|
||||
/ 2, v1 / 2, v2 / (v2 + v1 * x))</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
with y = (v2 * v1) / ((v2 + v1 * x) * (v2 + v1 * x))
|
||||
@@ -202,8 +202,8 @@
|
||||
and
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f<sub>v1,v2</sub>(x) = y * <a class="link" href="../../sf_beta/beta_derivative.html" title="Derivative of the Incomplete Beta Function">ibeta_derivative</a>(v1
|
||||
/ 2, v2 / 2, v1 * x / (v2 + v1 * x))
|
||||
<span class="serif_italic">f<sub>v1,v2</sub>(x) = y * <a class="link" href="../../sf_beta/beta_derivative.html" title="Derivative of the Incomplete Beta Function">ibeta_derivative</a>(v1
|
||||
/ 2, v2 / 2, v1 * x / (v2 + v1 * x))</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
with y = (z * v1 - x * v1 * v1) / z<sup>2</sup>
|
||||
@@ -232,15 +232,15 @@
|
||||
Using the relations:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
p = <a class="link" href="../../sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibeta</a>(v1
|
||||
/ 2, v2 / 2, v1 * x / (v2 + v1 * x))
|
||||
<span class="serif_italic">p = <a class="link" href="../../sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibeta</a>(v1
|
||||
/ 2, v2 / 2, v1 * x / (v2 + v1 * x))</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
and
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
p = <a class="link" href="../../sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibetac</a>(v2
|
||||
/ 2, v1 / 2, v2 / (v2 + v1 * x))
|
||||
<span class="serif_italic">:p = <a class="link" href="../../sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibetac</a>(v2
|
||||
/ 2, v1 / 2, v2 / (v2 + v1 * x))</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The first is used for v1 * x > v2, otherwise the second is
|
||||
@@ -263,15 +263,15 @@
|
||||
Using the relations:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
p = <a class="link" href="../../sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibetac</a>(v1
|
||||
/ 2, v2 / 2, v1 * x / (v2 + v1 * x))
|
||||
<span class="serif_italic">p = <a class="link" href="../../sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibetac</a>(v1
|
||||
/ 2, v2 / 2, v1 * x / (v2 + v1 * x))</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
and
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
p = <a class="link" href="../../sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibeta</a>(v2
|
||||
/ 2, v1 / 2, v2 / (v2 + v1 * x))
|
||||
<span class="serif_italic">p = <a class="link" href="../../sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibeta</a>(v2
|
||||
/ 2, v1 / 2, v2 / (v2 + v1 * x))</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The first is used for v1 * x < v2, otherwise the second is
|
||||
@@ -294,20 +294,20 @@
|
||||
Using the relation:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
x = v2 * a / (v1 * b)
|
||||
<span class="serif_italic">x = v2 * a / (v1 * b)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
a = <a class="link" href="../../sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibeta_inv</a>(v1
|
||||
/ 2, v2 / 2, p)
|
||||
<span class="serif_italic">a = <a class="link" href="../../sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibeta_inv</a>(v1
|
||||
/ 2, v2 / 2, p)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
and
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
b = 1 - a
|
||||
<span class="serif_italic">b = 1 - a</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
Quantities <span class="emphasis"><em>a</em></span> and <span class="emphasis"><em>b</em></span>
|
||||
@@ -330,20 +330,20 @@
|
||||
Using the relation:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
x = v2 * a / (v1 * b)
|
||||
<span class="serif_italic">x = v2 * a / (v1 * b)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
a = <a class="link" href="../../sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibetac_inv</a>(v1
|
||||
/ 2, v2 / 2, p)
|
||||
<span class="serif_italic">a = <a class="link" href="../../sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibetac_inv</a>(v1
|
||||
/ 2, v2 / 2, p)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
and
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
b = 1 - a
|
||||
<span class="serif_italic">b = 1 - a</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
Quantities <span class="emphasis"><em>a</em></span> and <span class="emphasis"><em>b</em></span>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
</h5>
|
||||
<p>
|
||||
In the following table <span class="emphasis"><em>k</em></span> is the shape parameter of
|
||||
the distribution, θ   is its scale parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
the distribution, θ is its scale parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
random variate, <span class="emphasis"><em>p</em></span> is the probability and <span class="emphasis"><em>q
|
||||
= 1-p</em></span>.
|
||||
</p>
|
||||
|
||||
@@ -102,23 +102,23 @@
|
||||
</p>
|
||||
<p>
|
||||
The probability that there are <span class="emphasis"><em>k</em></span> failures before the
|
||||
first success is
|
||||
</p>
|
||||
<p>
|
||||
   Pr(Y=<span class="emphasis"><em>k</em></span>) = (1-<span class="emphasis"><em>p</em></span>)<sup><span class="emphasis"><em>k</em></span></sup><span class="emphasis"><em>p</em></span>
|
||||
first success
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">Pr(Y=<span class="emphasis"><em>k</em></span>) = (1-<span class="emphasis"><em>p</em></span>)<sup><span class="emphasis"><em>k</em></span></sup><span class="emphasis"><em>p</em></span></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
For example, when throwing a 6-face dice the success probability <span class="emphasis"><em>p</em></span>
|
||||
= 1/6 = 0.1666 ̇  . Throwing repeatedly until a <span class="emphasis"><em>three</em></span>
|
||||
= 1/6 = 0.1666 ̇. Throwing repeatedly until a <span class="emphasis"><em>three</em></span>
|
||||
appears, the probability distribution of the number of times <span class="emphasis"><em>not-a-three</em></span>
|
||||
is thrown is geometric.
|
||||
</p>
|
||||
<p>
|
||||
Geometric distribution has the Probability Density Function PDF:
|
||||
</p>
|
||||
<p>
|
||||
   (1-<span class="emphasis"><em>p</em></span>)<sup><span class="emphasis"><em>k</em></span></sup><span class="emphasis"><em>p</em></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">(1-<span class="emphasis"><em>p</em></span>)<sup><span class="emphasis"><em>k</em></span></sup><span class="emphasis"><em>p</em></span></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The following graph illustrates how the PDF and CDF vary for three examples
|
||||
of the success fraction <span class="emphasis"><em>p</em></span>, (when considering the geometric
|
||||
|
||||
@@ -74,8 +74,10 @@
|
||||
= 1.
|
||||
</p>
|
||||
<p>
|
||||
Both definitions are also available in Wolfram Mathematica and in <a href="http://www.r-project.org/" target="_top">The R Project for Statistical Computing</a>
|
||||
(geoR) with default scale = 1/degrees of freedom.
|
||||
Both definitions are also available in <a href="http://www.wolfram.com/products/mathematica/index.html" target="_top">Wolfram
|
||||
Mathematica</a> and in <a href="http://www.r-project.org/" target="_top">The R
|
||||
Project for Statistical Computing</a> (geoR) with default scale = 1/degrees
|
||||
of freedom.
|
||||
</p>
|
||||
<p>
|
||||
See
|
||||
@@ -120,9 +122,9 @@
|
||||
The inverse_chi_squared distribution is a special case of a inverse_gamma
|
||||
distribution with ν (degrees_of_freedom) shape (α) and scale (β) where
|
||||
</p>
|
||||
<p>
|
||||
   α= ν /2 and β = ½.
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">α= ν /2 and β = ½</span>
|
||||
</p></blockquote></div>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
|
||||
@@ -149,29 +151,29 @@
|
||||
inverse chi_squared distribution is defined by the probability density
|
||||
function (PDF):
|
||||
</p>
|
||||
<p>
|
||||
   f(x;ν) = 2<sup>-ν/2</sup> x<sup>-ν/2-1</sup> e<sup>-1/2x</sup> / Γ(ν/2)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">f(x;ν) = 2<sup>-ν/2</sup> x<sup>-ν/2-1</sup> e<sup>-1/2x</sup> / Γ(ν/2)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
and Cumulative Density Function (CDF)
|
||||
</p>
|
||||
<p>
|
||||
   F(x;ν) = Γ(ν/2, 1/2x) / Γ(ν/2)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">F(x;ν) = Γ(ν/2, 1/2x) / Γ(ν/2)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
For degrees of freedom parameter ν and scale parameter ξ, the <span class="bold"><strong>scaled</strong></span>
|
||||
inverse chi_squared distribution is defined by the probability density
|
||||
function (PDF):
|
||||
</p>
|
||||
<p>
|
||||
   f(x;ν, ξ) = (ξν/2)<sup>ν/2</sup> e<sup>-νξ/2x</sup> x<sup>-1-ν/2</sup> / Γ(ν/2)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">f(x;ν, ξ) = (ξν/2)<sup>ν/2</sup> e<sup>-νξ/2x</sup> x<sup>-1-ν/2</sup> / Γ(ν/2)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
and Cumulative Density Function (CDF)
|
||||
</p>
|
||||
<p>
|
||||
   F(x;ν, ξ) = Γ(ν/2, νξ/2x) / Γ(ν/2)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">F(x;ν, ξ) = Γ(ν/2, νξ/2x) / Γ(ν/2)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The following graphs illustrate how the PDF and CDF of the inverse chi_squared
|
||||
distribution varies for a few values of parameters ν and ξ:
|
||||
|
||||
@@ -94,15 +94,15 @@
|
||||
For shape parameter α and scale parameter β, it is defined by the probability
|
||||
density function (PDF):
|
||||
</p>
|
||||
<p>
|
||||
   f(x;α, β) = β<sup>α</sup> * (1/x) <sup>α+1</sup> exp(-β/x) / Γ(α)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">f(x;α, β) = β<sup>α</sup> * (1/x) <sup>α+1</sup> exp(-β/x) / Γ(α)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
and cumulative density function (CDF)
|
||||
</p>
|
||||
<p>
|
||||
   F(x;α, β) = Γ(α, β/x) / Γ(α)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">F(x;α, β) = Γ(α, β/x) / Γ(α)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The following graphs illustrate how the PDF and CDF of the inverse gamma
|
||||
distribution varies as the parameters vary:
|
||||
@@ -188,7 +188,7 @@
|
||||
<span class="phrase"><a name="math_toolkit.dist_ref.dists.inverse_gamma_dist.implementation"></a></span><a class="link" href="inverse_gamma_dist.html#math_toolkit.dist_ref.dists.inverse_gamma_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
In the following table α is the shape parameter of the distribution, α   is its
|
||||
In the following table α is the shape parameter of the distribution, α is its
|
||||
scale parameter, <span class="emphasis"><em>x</em></span> is the random variate, <span class="emphasis"><em>p</em></span>
|
||||
is the probability and <span class="emphasis"><em>q = 1-p</em></span>.
|
||||
</p>
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
variate x, the inverse_gaussian distribution is defined by the probability
|
||||
density function (PDF):
|
||||
</p>
|
||||
<p>
|
||||
   f(x;μ, λ) = √(λ/2πx<sup>3</sup>) e<sup>-λ(x-μ)²/2μ²x</sup>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">f(x;μ, λ) = √(λ/2πx<sup>3</sup>) e<sup>-λ(x-μ)²/2μ²x</sup> </span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
and Cumulative Density Function (CDF):
|
||||
</p>
|
||||
<p>
|
||||
   F(x;μ, λ) = Φ{√(λ<span class="emphasis"><em>x) (x</em></span>μ-1)} + e<sup>2μ/λ</sup> Φ{-√(λ/μ) (1+x/μ)}
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">F(x;μ, λ) = Φ{√(λ<span class="emphasis"><em>x) (x</em></span>μ-1)}
|
||||
+ e<sup>2μ/λ</sup> Φ{-√(λ/μ) (1+x/μ)} </span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where Φ is the standard normal distribution CDF.
|
||||
</p>
|
||||
|
||||
@@ -61,11 +61,16 @@
|
||||
Distribution</a>.
|
||||
</p>
|
||||
<p>
|
||||
It is defined as the ratio X = χ<sub>m</sub><sup>2</sup>(λ) / (χ<sub>m</sub><sup>2</sup>(λ) + χ<sub>n</sub><sup>2</sup>) where χ<sub>m</sub><sup>2</sup>(λ) is a noncentral
|
||||
χ<sup>2</sup>
|
||||
random variable with <span class="emphasis"><em>m</em></span> degrees of freedom, and χ<sub>n</sub><sup>2</sup>
|
||||
is
|
||||
a central χ<sup>2</sup> random variable with <span class="emphasis"><em>n</em></span> degrees of freedom.
|
||||
It is defined as the ratio
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">X = χ<sub>m</sub><sup>2</sup>(λ) / (χ<sub>m</sub><sup>2</sup>(λ) + χ<sub>n</sub><sup>2</sup>)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where <span class="serif_italic">χ<sub>m</sub><sup>2</sup>(λ)</span> is a noncentral <span class="serif_italic">χ<sup>2</sup></span> random variable with <span class="emphasis"><em>m</em></span>
|
||||
degrees of freedom, and χ<sub>n</sub><sup>2</sup>
|
||||
is a central <span class="serif_italic">χ<sup>2</sup> </span>
|
||||
random variable with <span class="emphasis"><em>n</em></span> degrees of freedom.
|
||||
</p>
|
||||
<p>
|
||||
This gives a PDF that can be expressed as a Poisson mixture of beta distribution
|
||||
|
||||
@@ -66,8 +66,9 @@
|
||||
</pre>
|
||||
<p>
|
||||
The noncentral chi-squared distribution is a generalization of the <a class="link" href="chi_squared_dist.html" title="Chi Squared Distribution">Chi Squared Distribution</a>.
|
||||
If X<sub>i</sub> are ν independent, normally distributed random variables with means
|
||||
μ<sub>i</sub> and variances σ<sub>i</sub><sup>2</sup>, then the random variable
|
||||
If <span class="emphasis"><em>X<sub>i</sub></em></span> are /ν/ independent, normally distributed random
|
||||
variables with means /μ<sub>i</sub>/ and variances <span class="emphasis"><em>σ<sub>i</sub><sup>2</sup></em></span>, then the
|
||||
random variable
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../equations/nc_chi_squ_ref1.svg"></span>
|
||||
@@ -77,9 +78,10 @@
|
||||
is distributed according to the noncentral chi-squared distribution.
|
||||
</p>
|
||||
<p>
|
||||
The noncentral chi-squared distribution has two parameters: ν which specifies
|
||||
the number of degrees of freedom (i.e. the number of X<sub>i</sub>), and λ which is
|
||||
related to the mean of the random variables X<sub>i</sub> by:
|
||||
The noncentral chi-squared distribution has two parameters: /ν/ which specifies
|
||||
the number of degrees of freedom (i.e. the number of <span class="emphasis"><em>X<sub>i</sub>)</em></span>,
|
||||
and λ which is related to the mean of the random variables <span class="emphasis"><em>X<sub>i</sub></em></span>
|
||||
by:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../equations/nc_chi_squ_ref2.svg"></span>
|
||||
@@ -489,7 +491,7 @@
|
||||
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
Where P<sub>a</sub>(x) is the incomplete gamma function.
|
||||
Where <span class="emphasis"><em>P<sub>a</sub>(x)</em></span> is the incomplete gamma function.
|
||||
</p>
|
||||
<p>
|
||||
The method starts at the λth term, which is where the Poisson weighting
|
||||
|
||||
@@ -60,8 +60,9 @@
|
||||
The noncentral F distribution is a generalization of the <a class="link" href="f_dist.html" title="F Distribution">Fisher
|
||||
F Distribution</a>. It is defined as the ratio
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">F</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">X</span><span class="special">/</span><span class="identifier">v1</span><span class="special">)</span> <span class="special">/</span> <span class="special">(</span><span class="identifier">Y</span><span class="special">/</span><span class="identifier">v2</span><span class="special">)</span>
|
||||
</pre>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">F = (X/v1) / (Y/v2)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where X is a noncentral χ<sup>2</sup>
|
||||
random variable with <span class="emphasis"><em>v1</em></span> degrees
|
||||
@@ -76,7 +77,9 @@ random variable with <span class="emphasis"><em>v1</em></span> degrees
|
||||
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where L<sub>a</sub><sup>b</sup>(c) is a generalised Laguerre polynomial and B(a,b) is the <a class="link" href="../../sf_beta/beta_function.html" title="Beta">beta</a> function, or
|
||||
where <span class="emphasis"><em>L<sub>a</sub><sup>b</sup>(c)</em></span> is a generalised Laguerre polynomial
|
||||
and <span class="emphasis"><em>B(a,b)</em></span> is the <a class="link" href="../../sf_beta/beta_function.html" title="Beta">beta</a>
|
||||
function, or
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../equations/nc_f_ref2.svg"></span>
|
||||
@@ -102,7 +105,8 @@ random variable with <span class="emphasis"><em>v1</em></span> degrees
|
||||
and <span class="emphasis"><em>v2</em></span> and non-centrality parameter <span class="emphasis"><em>lambda</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
Requires v1 > 0, v2 > 0 and lambda >= 0, otherwise calls <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>.
|
||||
Requires <span class="emphasis"><em>v1</em></span> > 0, <span class="emphasis"><em>v2</em></span> > 0
|
||||
and lambda >= 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">RealType</span> <span class="identifier">degrees_of_freedom1</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
@@ -199,13 +203,15 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
Implemented in terms of the non-central beta PDF using the relation:
|
||||
</p>
|
||||
<p>
|
||||
f(x;v1,v2;λ) = (v1/v2) / ((1+y)*(1+y)) * g(y/(1+y);v1/2,v2/2;λ)
|
||||
<span class="serif_italic">f(x;v1,v2;λ) = (v1/v2) / ((1+y)*(1+y))
|
||||
* g(y/(1+y);v1/2,v2/2;λ)</span>
|
||||
</p>
|
||||
<p>
|
||||
where g(x; a, b; λ) is the non central beta PDF, and:
|
||||
where <span class="serif_italic">g(x; a, b; λ)</span> is the
|
||||
non central beta PDF, and:
|
||||
</p>
|
||||
<p>
|
||||
y = x * v1 / v2
|
||||
<span class="serif_italic">y = x * v1 / v2</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -220,13 +226,14 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
Using the relation:
|
||||
</p>
|
||||
<p>
|
||||
p = B<sub>y</sub>(v1/2, v2/2; λ)
|
||||
<span class="serif_italic">p = B<sub>y</sub>(v1/2, v2/2; λ)</span>
|
||||
</p>
|
||||
<p>
|
||||
where B<sub>x</sub>(a, b; λ) is the noncentral beta distribution CDF and
|
||||
where <span class="serif_italic">B<sub>x</sub>(a, b; λ)</span> is the
|
||||
noncentral beta distribution CDF and
|
||||
</p>
|
||||
<p>
|
||||
y = x * v1 / v2
|
||||
<span class="serif_italic">y = x * v1 / v2</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -241,14 +248,14 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
Using the relation:
|
||||
</p>
|
||||
<p>
|
||||
q = 1 - B<sub>y</sub>(v1/2, v2/2; λ)
|
||||
<span class="serif_italic">q = 1 - B<sub>y</sub>(v1/2, v2/2; λ)</span>
|
||||
</p>
|
||||
<p>
|
||||
where 1 - B<sub>x</sub>(a, b; λ) is the complement of the noncentral beta
|
||||
distribution CDF and
|
||||
where <span class="serif_italic">1 - B<sub>x</sub>(a, b; λ)</span> is
|
||||
the complement of the noncentral beta distribution CDF and
|
||||
</p>
|
||||
<p>
|
||||
y = x * v1 / v2
|
||||
<span class="serif_italic">y = x * v1 / v2</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -263,19 +270,19 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
Using the relation:
|
||||
</p>
|
||||
<p>
|
||||
x = (bx / (1-bx)) * (v1 / v2)
|
||||
<span class="serif_italic">x = (bx / (1-bx)) * (v1 / v2)</span>
|
||||
</p>
|
||||
<p>
|
||||
where
|
||||
</p>
|
||||
<p>
|
||||
bx = Q<sub>p</sub><sup>-1</sup>(v1/2, v2/2; λ)
|
||||
<span class="serif_italic">bx = Q<sub>p</sub><sup>-1</sup>(v1/2, v2/2; λ)</span>
|
||||
</p>
|
||||
<p>
|
||||
and
|
||||
</p>
|
||||
<p>
|
||||
Q<sub>p</sub><sup>-1</sup>(v1/2, v2/2; λ)
|
||||
<span class="serif_italic">Q<sub>p</sub><sup>-1</sup>(v1/2, v2/2; λ)</span>
|
||||
</p>
|
||||
<p>
|
||||
is the noncentral beta quantile.
|
||||
@@ -296,19 +303,19 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
Using the relation:
|
||||
</p>
|
||||
<p>
|
||||
x = (bx / (1-bx)) * (v1 / v2)
|
||||
<span class="serif_italic">x = (bx / (1-bx)) * (v1 / v2)</span>
|
||||
</p>
|
||||
<p>
|
||||
where
|
||||
</p>
|
||||
<p>
|
||||
bx = QC<sub>q</sub><sup>-1</sup>(v1/2, v2/2; λ)
|
||||
<span class="serif_italic">bx = QC<sub>q</sub><sup>-1</sup>(v1/2, v2/2; λ)</span>
|
||||
</p>
|
||||
<p>
|
||||
and
|
||||
</p>
|
||||
<p>
|
||||
QC<sub>q</sub><sup>-1</sup>(v1/2, v2/2; λ)
|
||||
<span class="serif_italic">QC<sub>q</sub><sup>-1</sup>(v1/2, v2/2; λ)</span>
|
||||
</p>
|
||||
<p>
|
||||
is the noncentral beta quantile from the complement.
|
||||
@@ -323,7 +330,7 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
v2 * (v1 + l) / (v1 * (v2 - 2))
|
||||
<span class="serif_italic">v2 * (v1 + l) / (v1 * (v2 - 2))</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
<p>
|
||||
The noncentral T distribution is a generalization of the <a class="link" href="students_t_dist.html" title="Students t Distribution">Students
|
||||
t Distribution</a>. Let X have a normal distribution with mean δ and variance
|
||||
1, and let ν S<sup>2</sup> have a chi-squared distribution with degrees of freedom ν.
|
||||
Assume that X and S<sup>2</sup> are independent. The distribution of t<sub>ν</sub>(δ)=X/S is called
|
||||
a noncentral t distribution with degrees of freedom ν and noncentrality parameter
|
||||
δ.
|
||||
1, and let <span class="emphasis"><em>ν S<sup>2</sup></em></span> have a chi-squared distribution with
|
||||
degrees of freedom ν. Assume that X and S<sup>2</sup> are independent. The distribution
|
||||
of <span class="serif_italic">t<sub>ν</sub>(δ)=X/S</span> is called a noncentral
|
||||
t distribution with degrees of freedom ν and noncentrality parameter δ.
|
||||
</p>
|
||||
<p>
|
||||
This gives the following PDF:
|
||||
@@ -71,7 +71,8 @@
|
||||
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where <sub>1</sub>F<sub>1</sub>(a;b;x) is a confluent hypergeometric function.
|
||||
where <span class="serif_italic"><sub>1</sub>F<sub>1</sub>(a;b;x)</span> is a confluent hypergeometric
|
||||
function.
|
||||
</p>
|
||||
<p>
|
||||
The following graph illustrates how the distribution changes for different
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
Normal Distribution</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
Given mean μ  and standard deviation σ it has the PDF:
|
||||
Given mean μ and standard deviation σ it has the PDF:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../equations/normal_ref1.svg"></span>
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
density function (pdf)</a>:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f(x; α, β) = αβ<sup>α</sup> / x<sup>α+ 1</sup>
|
||||
<span class="serif_italic">f(x; α, β) = αβ<sup>α</sup> / x<sup>α+ 1</sup></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
For shape parameter α   > 0, and scale parameter β   > 0. If x < β  , the
|
||||
For shape parameter α > 0, and scale parameter β > 0. If x < β, the
|
||||
pdf is zero.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
density function</a>:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f(x; sigma) = x * exp(-x<sup>2</sup>/2 σ<sup>2</sup>) / σ<sup>2</sup>
|
||||
<span class="serif_italic">f(x; sigma) = x * exp(-x<sup>2</sup>/2 σ<sup>2</sup>) / σ<sup>2</sup></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
For sigma parameter σ   > 0, and x > 0.
|
||||
For sigma parameter /σ/ > 0, and <span class="emphasis"><em>x</em></span> > 0.
|
||||
</p>
|
||||
<p>
|
||||
The Rayleigh distribution is often used where two orthogonal components
|
||||
@@ -151,7 +151,7 @@
|
||||
<span class="phrase"><a name="math_toolkit.dist_ref.dists.rayleigh.implementation"></a></span><a class="link" href="rayleigh.html#math_toolkit.dist_ref.dists.rayleigh.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
In the following table σ   is the sigma parameter of the distribution, <span class="emphasis"><em>x</em></span>
|
||||
In the following table σ is the sigma parameter of the distribution, <span class="emphasis"><em>x</em></span>
|
||||
is the random variate, <span class="emphasis"><em>p</em></span> is the probability and <span class="emphasis"><em>q
|
||||
= 1-p</em></span>.
|
||||
</p>
|
||||
@@ -193,7 +193,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Using the relation: p = 1 - exp(-x<sup>2</sup>/2) σ<sup>2</sup>   = -<a class="link" href="../../powers/expm1.html" title="expm1">expm1</a>(-x<sup>2</sup>/2)
|
||||
Using the relation: p = 1 - exp(-x<sup>2</sup>/2) σ<sup>2</sup>= -<a class="link" href="../../powers/expm1.html" title="expm1">expm1</a>(-x<sup>2</sup>/2)
|
||||
σ<sup>2</sup>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
@@ -73,14 +73,14 @@
|
||||
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where <span class="emphasis"><em>M</em></span> is the population mean, <span class="emphasis"><em>μ</em></span>
|
||||
is the sample mean, and <span class="emphasis"><em>s</em></span> is the sample variance.
|
||||
where <span class="emphasis"><em>M</em></span> is the population mean, μ is the sample mean,
|
||||
and <span class="emphasis"><em>s</em></span> is the sample variance.
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://en.wikipedia.org/wiki/Student%27s_t-distribution" target="_top">Student's
|
||||
t-distribution</a> is defined as the distribution of the random variable
|
||||
t which is - very loosely - the "best" that we can do not knowing
|
||||
the true standard deviation of the sample. It has the PDF:
|
||||
t which is - very loosely - the "best" that we can do while not
|
||||
knowing the true standard deviation of the sample. It has the PDF:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../equations/students_t_ref1.svg"></span>
|
||||
@@ -248,9 +248,9 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Using the relation: pdf = (v / (v + t<sup>2</sup>))<sup>(1+v)/2 </sup> / (sqrt(v) *
|
||||
<a class="link" href="../../sf_beta/beta_function.html" title="Beta">beta</a>(v/2,
|
||||
0.5))
|
||||
Using the relation: <span class="serif_italic">pdf = (v / (v
|
||||
+ t<sup>2</sup>))<sup>(1+v)/2 </sup> / (sqrt(v) * <a class="link" href="../../sf_beta/beta_function.html" title="Beta">beta</a>(v/2,
|
||||
0.5))</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -265,10 +265,10 @@
|
||||
Using the relations:
|
||||
</p>
|
||||
<p>
|
||||
p = 1 - z <span class="emphasis"><em>iff t > 0</em></span>
|
||||
<span class="serif_italic">p = 1 - z <span class="emphasis"><em>iff t > 0</em></span></span>
|
||||
</p>
|
||||
<p>
|
||||
p = z <span class="emphasis"><em>otherwise</em></span>
|
||||
<span class="serif_italic">p = z <span class="emphasis"><em>otherwise</em></span></span>
|
||||
</p>
|
||||
<p>
|
||||
where z is given by:
|
||||
@@ -303,17 +303,18 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Using the relation: t = sign(p - 0.5) * sqrt(v * y / x)
|
||||
Using the relation: <span class="serif_italic">t = sign(p -
|
||||
0.5) * sqrt(v * y / x)</span>
|
||||
</p>
|
||||
<p>
|
||||
where:
|
||||
</p>
|
||||
<p>
|
||||
x = <a class="link" href="../../sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibeta_inv</a>(v
|
||||
/ 2, 0.5, 2 * min(p, q))
|
||||
<span class="serif_italic">x = <a class="link" href="../../sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibeta_inv</a>(v
|
||||
/ 2, 0.5, 2 * min(p, q)) </span>
|
||||
</p>
|
||||
<p>
|
||||
y = 1 - x
|
||||
<span class="serif_italic">y = 1 - x</span>
|
||||
</p>
|
||||
<p>
|
||||
The quantities <span class="emphasis"><em>x</em></span> and <span class="emphasis"><em>y</em></span>
|
||||
|
||||
@@ -74,24 +74,32 @@
|
||||
density function</a>:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f(x) =
|
||||
<span class="serif_italic">f(x) =</span>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
2(x-a)/(b-a) (c-a)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
for a <= x <= c
|
||||
</p></blockquote></div>
|
||||
</blockquote></div></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><div class="blockquote"><blockquote class="blockquote">
|
||||
<span class="serif_italic">
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
2(b-x)/(b-a) (b-c)
|
||||
</p>
|
||||
2(x-a)/(b-a) (c-a)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
for c < x <= b
|
||||
</p></blockquote></div>
|
||||
</blockquote></div></blockquote></div>
|
||||
for a <= x <= c
|
||||
</p></blockquote></div>
|
||||
</blockquote></div>
|
||||
</span>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
2(b-x)/(b-a) (b-c)
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
for c < x <= b
|
||||
</p></blockquote></div>
|
||||
</blockquote></div>
|
||||
</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
Parameter <span class="emphasis"><em>a</em></span> (lower) can be any finite value. Parameter
|
||||
<span class="emphasis"><em>b</em></span> (upper) can be any finite value > a (lower).
|
||||
|
||||
@@ -59,19 +59,21 @@
|
||||
density function</a>:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f(x) =
|
||||
<span class="serif_italic">f(x) =</span>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">1 / (upper - lower) for lower < x <
|
||||
upper</span>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">zero for x < lower or x > upper</span>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><div class="blockquote"><blockquote class="blockquote"><p>
|
||||
1 / (upper - lower) for lower < x < upper
|
||||
</p></blockquote></div></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><div class="blockquote"><blockquote class="blockquote"><p>
|
||||
zero for x < lower or x > upper
|
||||
</p></blockquote></div></blockquote></div>
|
||||
<p>
|
||||
and in this implementation:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
1 / (upper - lower) for x = lower or x = upper
|
||||
<span class="serif_italic">1 / (upper - lower) for x = lower or x =
|
||||
upper</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
The choice of x = lower or x = upper is made because statistical use of
|
||||
|
||||
@@ -56,10 +56,11 @@
|
||||
density function</a>:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
f(x; α, β) = (α/β) * (x / β)<sup>α - 1</sup> * e<sup>-(x/β)<sup>α</sup></sup>
|
||||
<span class="serif_italic">f(x; α, β) = (α/β) * (x / β)<sup>α - 1</sup> * e<sup>-(x/β)<sup>α</sup></sup></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
For shape parameter α > 0, and scale parameter β > 0, and x > 0.
|
||||
For shape parameter <span class="emphasis"><em>α</em></span> > 0, and scale parameter
|
||||
<span class="emphasis"><em>β</em></span> > 0, and <span class="emphasis"><em>x</em></span> > 0.
|
||||
</p>
|
||||
<p>
|
||||
The Weibull distribution is often used in the field of failure analysis;
|
||||
@@ -68,20 +69,21 @@
|
||||
</p>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
constant over time, then α   = 1, suggests that items are failing from
|
||||
random events.
|
||||
constant over time, then <span class="emphasis"><em>α</em></span> = 1, suggests that items
|
||||
are failing from random events.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
decreases over time, then α   < 1, suggesting "infant mortality".
|
||||
decreases over time, then <span class="emphasis"><em>α</em></span> < 1, suggesting
|
||||
"infant mortality".
|
||||
</li>
|
||||
<li class="listitem">
|
||||
increases over time, then α   > 1, suggesting "wear out" -
|
||||
more likely to fail as time goes by.
|
||||
increases over time, then <span class="emphasis"><em>α</em></span> > 1, suggesting
|
||||
"wear out" - more likely to fail as time goes by.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
The following graph illustrates how the PDF varies with the shape parameter
|
||||
α:
|
||||
<span class="emphasis"><em>α</em></span>:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../graphs/weibull_pdf1.svg" align="middle"></span>
|
||||
@@ -89,7 +91,7 @@
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
While this graph illustrates how the PDF varies with the scale parameter
|
||||
β:
|
||||
<span class="emphasis"><em>β</em></span>:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../../graphs/weibull_pdf2.svg" align="middle"></span>
|
||||
@@ -101,10 +103,10 @@
|
||||
distributions</a>
|
||||
</h5>
|
||||
<p>
|
||||
When α   = 3, the <a href="http://en.wikipedia.org/wiki/Weibull_distribution" target="_top">Weibull
|
||||
When <span class="emphasis"><em>α</em></span> = 3, the <a href="http://en.wikipedia.org/wiki/Weibull_distribution" target="_top">Weibull
|
||||
distribution</a> appears similar to the <a href="http://en.wikipedia.org/wiki/Normal_distribution" target="_top">normal
|
||||
distribution</a>. When α   = 1, the Weibull distribution reduces to the
|
||||
<a href="http://en.wikipedia.org/wiki/Exponential_distribution" target="_top">exponential
|
||||
distribution</a>. When <span class="emphasis"><em>α</em></span> = 1, the Weibull distribution
|
||||
reduces to the <a href="http://en.wikipedia.org/wiki/Exponential_distribution" target="_top">exponential
|
||||
distribution</a>. The relationship of the types of extreme value distributions,
|
||||
of which the Weibull is but one, is discussed by <a href="http://www.worldscibooks.com/mathematics/p191.html" target="_top">Extreme
|
||||
Value Distributions, Theory and Applications Samuel Kotz & Saralees
|
||||
@@ -171,9 +173,10 @@
|
||||
<span class="phrase"><a name="math_toolkit.dist_ref.dists.weibull_dist.implementation"></a></span><a class="link" href="weibull_dist.html#math_toolkit.dist_ref.dists.weibull_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
In the following table α   is the shape parameter of the distribution, β   is its
|
||||
scale parameter, <span class="emphasis"><em>x</em></span> is the random variate, <span class="emphasis"><em>p</em></span>
|
||||
is the probability and <span class="emphasis"><em>q = 1-p</em></span>.
|
||||
In the following table <span class="emphasis"><em>α</em></span> is the shape parameter of
|
||||
the distribution, <span class="emphasis"><em>β</em></span> is its scale parameter, <span class="emphasis"><em>x</em></span>
|
||||
is the random variate, <span class="emphasis"><em>p</em></span> is the probability and <span class="emphasis"><em>q
|
||||
= 1-p</em></span>.
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
|
||||
@@ -75,8 +75,9 @@
|
||||
when the origin is neither in the center of the range, nor at an endpoint.
|
||||
Consider integrating:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="number">1</span> <span class="special">/</span> <span class="special">(</span><span class="number">1</span> <span class="special">+</span><span class="identifier">x</span><span class="special">^</span><span class="number">2</span><span class="special">)</span>
|
||||
</pre>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">1 / (1 +x^2)</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
Over (a, ∞). As long as <code class="computeroutput"><span class="identifier">a</span> <span class="special">>=</span> <span class="number">0</span></code> both
|
||||
the tanh_sinh and the exp_sinh integrators will handle this just fine: in
|
||||
@@ -92,8 +93,8 @@
|
||||
each seperately using the tanh-sinh integrator, works just fine.
|
||||
</p>
|
||||
<p>
|
||||
Finally, some endpoint singularities are too strong to be handled by tanh_sinh
|
||||
or equivalent methods, for example consider integrating the function:
|
||||
Finally, some endpoint singularities are too strong to be handled by <code class="computeroutput"><span class="identifier">tanh_sinh</span></code> or equivalent methods, for example
|
||||
consider integrating the function:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">p</span> <span class="special">=</span> <span class="identifier">some_value</span><span class="special">;</span>
|
||||
<span class="identifier">tanh_sinh</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">integrator</span><span class="special">;</span>
|
||||
@@ -116,12 +117,12 @@
|
||||
over.
|
||||
</p>
|
||||
<p>
|
||||
This actually works just fine for p < 0.95, but after that the tanh_sinh
|
||||
integrator starts thrashing around and is unable to converge on the integral.
|
||||
The problem is actually a lack of exponent range: if we simply swap type
|
||||
double for something with a greater exponent range (an 80-bit long double
|
||||
or a quad precision type), then we can get to at least p = 0.99. If we want
|
||||
to go beyond that, or stick with type double, then we have to get smart.
|
||||
This actually works just fine for p < 0.95, but after that the <code class="computeroutput"><span class="identifier">tanh_sinh</span></code> integrator starts thrashing around
|
||||
and is unable to converge on the integral. The problem is actually a lack
|
||||
of exponent range: if we simply swap type double for something with a greater
|
||||
exponent range (an 80-bit long double or a quad precision type), then we
|
||||
can get to at least p = 0.99. If we want to go beyond that, or stick with
|
||||
type double, then we have to get smart.
|
||||
</p>
|
||||
<p>
|
||||
The easiest method is to notice that for small x, then <code class="literal">tan(x) ≅ x</code>,
|
||||
@@ -164,8 +165,8 @@
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
This form integrates just fine over (-log(π/2), +∞) using either the tanh_sinh
|
||||
or exp_sinh classes.
|
||||
This form integrates just fine over (-log(π/2), +∞) using either the <code class="computeroutput"><span class="identifier">tanh_sinh</span></code> or <code class="computeroutput"><span class="identifier">exp_sinh</span></code>
|
||||
classes.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
For half-infinite intervals, the exp-sinh quadrature is provided:
|
||||
For half-infinite intervals, the <code class="computeroutput"><span class="identifier">exp</span><span class="special">-</span><span class="identifier">sinh</span></code> quadrature
|
||||
is provided:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">exp_sinh</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">integrator</span><span class="special">;</span>
|
||||
<span class="keyword">auto</span> <span class="identifier">f</span> <span class="special">=</span> <span class="special">[](</span><span class="keyword">double</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">exp</span><span class="special">(-</span><span class="number">3</span><span class="special">*</span><span class="identifier">x</span><span class="special">);</span> <span class="special">};</span>
|
||||
@@ -58,10 +59,10 @@
|
||||
</pre>
|
||||
<p>
|
||||
The native integration range of this integrator is (0, ∞), but we also support
|
||||
(a, ∞), (-∞, 0) and (-∞, b) via argument transformations.
|
||||
/(a, ∞), (-∞, 0)/ and /(-∞, b)/ via argument transformations.
|
||||
</p>
|
||||
<p>
|
||||
Endpoint singularities and complex-valued integrands are supported by exp-sinh.
|
||||
Endpoint singularities and complex-valued integrands are supported by <code class="computeroutput"><span class="identifier">exp</span><span class="special">-</span><span class="identifier">sinh</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
For example, the modified Bessel function K can be represented via:
|
||||
|
||||
@@ -100,11 +100,11 @@
|
||||
For example, the <code class="computeroutput"><span class="identifier">sinh_sinh</span></code>
|
||||
quadrature integrates over the entire real line, the <code class="computeroutput"><span class="identifier">tanh_sinh</span></code>
|
||||
over (-1, 1), and the <code class="computeroutput"><span class="identifier">exp_sinh</span></code>
|
||||
over (0, ∞). The latter integrators also have auxilliary ranges which
|
||||
are handled via a change of variables on the function being integrated, so
|
||||
that the <code class="computeroutput"><span class="identifier">tanh_sinh</span></code> can handle
|
||||
integration over (a, b), and <code class="computeroutput"><span class="identifier">exp_sinh</span></code>
|
||||
over (a, ∞) and(-∞, b).
|
||||
over (0, ∞). The latter integrators also have auxilliary ranges which are
|
||||
handled via a change of variables on the function being integrated, so that
|
||||
the <code class="computeroutput"><span class="identifier">tanh_sinh</span></code> can handle
|
||||
integration over <span class="emphasis"><em>(a, b)</em></span>, and <code class="computeroutput"><span class="identifier">exp_sinh</span></code>
|
||||
over /(a, ∞) and(-∞, b)/.
|
||||
</p>
|
||||
<p>
|
||||
Like the other quadrature routines in Boost, these routines support both
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<span class="keyword">double</span> <span class="identifier">Q</span> <span class="special">=</span> <span class="identifier">integrator</span><span class="special">.</span><span class="identifier">integrate</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="special">&</span><span class="identifier">error</span><span class="special">,</span> <span class="special">&</span><span class="identifier">L1</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
Note that the limits of integration are understood to be (-∞, ∞).
|
||||
Note that the limits of integration are understood to be (-∞, +∞).
|
||||
</p>
|
||||
<p>
|
||||
Complex valued integrands are supported as well, for example the <a href="https://en.wikipedia.org/wiki/Dirichlet_eta_function" target="_top">Dirichlet
|
||||
|
||||
@@ -49,16 +49,20 @@
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
The tanh-sinh quadrature routine provided by boost is a rapidly convergent
|
||||
numerical integration scheme for holomorphic integrands. By this we mean
|
||||
that the integrand is the restriction to the real line of a complex-differentiable
|
||||
function which is bounded on the interior of the unit disk <span class="emphasis"><em>|z|
|
||||
< 1</em></span>, so that it lies within the so-called <a href="https://en.wikipedia.org/wiki/Hardy_space" target="_top">Hardy
|
||||
space</a>. If your integrand obeys these conditions, it can be shown
|
||||
that tanh-sinh integration is optimal, in the sense that it requires the
|
||||
fewest function evaluations for a given accuracy of any quadrature algorithm
|
||||
for a random element from the Hardy space. A basic example of how to use
|
||||
the tanh-sinh quadrature is shown below:
|
||||
The <code class="computeroutput"><span class="identifier">tanh</span><span class="special">-</span><span class="identifier">sinh</span></code> quadrature routine provided by boost
|
||||
is a rapidly convergent numerical integration scheme for holomorphic integrands.
|
||||
By this we mean that the integrand is the restriction to the real line of
|
||||
a complex-differentiable function which is bounded on the interior of the
|
||||
unit disk <span class="emphasis"><em>|z| < 1</em></span>, so that it lies within the so-called
|
||||
<a href="https://en.wikipedia.org/wiki/Hardy_space" target="_top">Hardy space</a>.
|
||||
If your integrand obeys these conditions, it can be shown that <code class="computeroutput"><span class="identifier">tanh</span><span class="special">-</span><span class="identifier">sinh</span></code>
|
||||
integration is optimal, in the sense that it requires the fewest function
|
||||
evaluations for a given accuracy of any quadrature algorithm for a random
|
||||
element from the Hardy space.
|
||||
</p>
|
||||
<p>
|
||||
A basic example of how to use the <code class="computeroutput"><span class="identifier">tanh</span><span class="special">-</span><span class="identifier">sinh</span></code> quadrature
|
||||
is shown below:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">tanh_sinh</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">integrator</span><span class="special">;</span>
|
||||
<span class="keyword">auto</span> <span class="identifier">f</span> <span class="special">=</span> <span class="special">[](</span><span class="keyword">double</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="number">5</span><span class="special">*</span><span class="identifier">x</span> <span class="special">+</span> <span class="number">7</span><span class="special">;</span> <span class="special">};</span>
|
||||
@@ -68,7 +72,7 @@
|
||||
<span class="identifier">Q</span> <span class="special">=</span> <span class="identifier">integrator</span><span class="special">.</span><span class="identifier">integrate</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="number">0.0</span><span class="special">,</span> <span class="number">1.1</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
The basic idea of tanh-sinh quadrature is that a variable transformation
|
||||
The basic idea of <code class="computeroutput"><span class="identifier">tanh</span><span class="special">-</span><span class="identifier">sinh</span></code> quadrature is that a variable transformation
|
||||
can cause the endpoint derivatives to decay rapidly. When the derivatives
|
||||
at the endpoints decay much faster than the Bernoulli numbers grow, the Euler-Maclaurin
|
||||
summation formula tells us that simple trapezoidal quadrature converges faster
|
||||
@@ -483,11 +487,11 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
Although the tanh-sinh quadrature can compute integral over infinite domains
|
||||
by variable transformations, these transformations can create a very poorly
|
||||
behaved integrand. For this reason, double-exponential variable transformations
|
||||
have been provided that allow stable computation over infinite domains; these
|
||||
being the exp-sinh and sinh-sinh quadrature.
|
||||
Although the <code class="computeroutput"><span class="identifier">tanh</span><span class="special">-</span><span class="identifier">sinh</span></code> quadrature can compute integral over
|
||||
infinite domains by variable transformations, these transformations can create
|
||||
a very poorly behaved integrand. For this reason, double-exponential variable
|
||||
transformations have been provided that allow stable computation over infinite
|
||||
domains; these being the exp-sinh and sinh-sinh quadrature.
|
||||
</p>
|
||||
<h5>
|
||||
<a name="math_toolkit.double_exponential.de_tanh_sinh.h0"></a>
|
||||
@@ -495,9 +499,10 @@
|
||||
integrals</a>
|
||||
</h5>
|
||||
<p>
|
||||
The tanh_sinh integrator supports integration of functions which return complex
|
||||
results, for example the sine-integral <code class="computeroutput"><span class="identifier">Si</span><span class="special">(</span><span class="identifier">z</span><span class="special">)</span></code>
|
||||
has the integral representation:
|
||||
The <code class="computeroutput"><span class="identifier">tanh_sinh</span></code> integrator
|
||||
supports integration of functions which return complex results, for example
|
||||
the sine-integral <code class="computeroutput"><span class="identifier">Si</span><span class="special">(</span><span class="identifier">z</span><span class="special">)</span></code> has
|
||||
the integral representation:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="inlinemediaobject"><img src="../../../equations/sine_integral.svg"></span>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<span class="keyword">double</span> <span class="identifier">Q</span> <span class="special">=</span> <span class="identifier">integrator</span><span class="special">.</span><span class="identifier">integrate</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="number">0.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
Not only is this form accurate to full machine precision, but it converges
|
||||
Not only is this form accurate to full machine-precision, but it converges
|
||||
to the result faster as well.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
The default error actions are to throw an exception with an informative error
|
||||
message. If you do not try to catch the exception, you will not see the message!
|
||||
message. <span class="red">If you do not try to catch the exception, you
|
||||
will not see the message!</span>
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
@@ -832,27 +833,14 @@
|
||||
<span class="emphasis"><em>"Each of the functions declared above shall return a NaN (Not
|
||||
a Number) if any argument value is a NaN, but it shall not report a domain
|
||||
error. Otherwise, each of the functions declared above shall report a domain
|
||||
error for just those argument values for which:</em></span>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
<span class="emphasis"><em>"the function description's Returns clause explicitly specifies
|
||||
a domain, and those arguments fall outside the specified domain; or</em></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="emphasis"><em>"the corresponding mathematical function value has a non-zero
|
||||
imaginary component; or</em></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="emphasis"><em>"the corresponding mathematical function is not mathematically
|
||||
defined.</em></span>
|
||||
</p>
|
||||
</blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="emphasis"><em>"Note 2: A mathematical function is mathematically defined
|
||||
for a given set of argument values if it is explicitly defined for that set
|
||||
of argument values or if its limiting value exists and does not depend on
|
||||
the direction of approach."</em></span>
|
||||
error for just those argument values for which:<br> the function description's
|
||||
Returns clause explicitly specifies a domain, and those arguments fall outside
|
||||
the specified domain; or <br> the corresponding mathematical function value
|
||||
has a non-zero imaginary component; or <br> the corresponding mathematical
|
||||
function is not mathematically defined. <br> Note 2: A mathematical function
|
||||
is mathematically defined for a given set of argument values if it is explicitly
|
||||
defined for that set of argument values or if its limiting value exists and
|
||||
does not depend on the direction of approach."</em></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
Note that in order to support information-rich error messages when throwing
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<th align="left">Warning</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
Failure to heed this will lead to incorrect, and very likely undesired, results.
|
||||
Failure to heed this will lead to incorrect, and very likely undesired, results!
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
</div>
|
||||
|
||||
@@ -28,11 +28,13 @@
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
Currently open bug reports can be viewed <a href="https://github.com/boostorg/math/issues" target="_top">here</a>
|
||||
on GIThub.
|
||||
on GitHub.
|
||||
</p>
|
||||
<p>
|
||||
All old bug reports including closed ones can be viewed on Trac <a href="https://svn.boost.org/trac/boost/query?status=assigned&status=closed&status=new&status=reopened&component=math&col=id&col=summary&col=status&col=type&col=milestone&col=component&order=priority" target="_top">here</a>
|
||||
and more recent issues on GIThub <a href="https://github.com/boostorg/math/issues?utf8=%E2%9C%93&q=is%3Aissue" target="_top">here</a>.
|
||||
All old bug reports including closed ones can be viewed on Trac <a href="https://svn.boost.org/trac/boost/query?status=assigned&status=closed&status=new&status=reopened&component=math&col=id&col=summary&col=status&col=type&col=milestone&col=component&order=priority" target="_top">here</a>.
|
||||
</p>
|
||||
<p>
|
||||
Recent issues on GitHub <a href="https://github.com/boostorg/math/issues?utf8=%E2%9C%93&q=is%3Aissue" target="_top">here</a>.
|
||||
</p>
|
||||
<h5>
|
||||
<a name="math_toolkit.history1.h0"></a>
|
||||
@@ -41,31 +43,31 @@
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
Catmull-Rom interpolator now works in C++11
|
||||
Catmull-Rom interpolator now works in C++11.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Cardinal quadratic B-spline interpolation
|
||||
Cardinal quadratic B-spline interpolation.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Domain of elliptic integrals extended
|
||||
Domain of elliptic integrals extended.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
sin_pi and cos_pi performance improvements
|
||||
sin_pi and cos_pi performance improvements.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Forward-mode automatic differentiation
|
||||
Forward-mode automatic differentiation.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Vector valued barycentric rational interpolation
|
||||
Vector valued barycentric rational interpolation.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Ooura's method for evaluation of Fourier integrals
|
||||
Ooura's method for evaluation of Fourier integrals.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Multiple compatibility issues with Multiprecision fixed
|
||||
Multiple compatibility issues with Multiprecision fixed.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Lambert-W fixed on a rare architecture
|
||||
Lambert-W fixed on a rare architecture.
|
||||
</li>
|
||||
</ul></div>
|
||||
<h5>
|
||||
|
||||
@@ -28,11 +28,13 @@
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
Currently open bug reports can be viewed <a href="https://github.com/boostorg/math/issues" target="_top">here</a>
|
||||
on GIThub.
|
||||
on GitHub.
|
||||
</p>
|
||||
<p>
|
||||
All old bug reports including closed ones can be viewed on Trac <a href="https://svn.boost.org/trac/boost/query?status=assigned&status=closed&status=new&status=reopened&component=math&col=id&col=summary&col=status&col=type&col=milestone&col=component&order=priority" target="_top">here</a>
|
||||
and more recent issues on GIThub <a href="https://github.com/boostorg/math/issues?utf8=%E2%9C%93&q=is%3Aissue" target="_top">here</a>.
|
||||
All old bug reports including closed ones can be viewed on Trac <a href="https://svn.boost.org/trac/boost/query?status=assigned&status=closed&status=new&status=reopened&component=math&col=id&col=summary&col=status&col=type&col=milestone&col=component&order=priority" target="_top">here</a>.
|
||||
</p>
|
||||
<p>
|
||||
Recent issues on GitHub <a href="https://github.com/boostorg/math/issues?utf8=%E2%9C%93&q=is%3Aissue" target="_top">here</a>.
|
||||
</p>
|
||||
<h5>
|
||||
<a name="math_toolkit.history2.h0"></a>
|
||||
@@ -41,31 +43,31 @@
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
Catmull-Rom interpolator now works in C++11
|
||||
Catmull-Rom interpolator now works in C++11.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Cardinal quadratic B-spline interpolation
|
||||
Cardinal quadratic B-spline interpolation.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Domain of elliptic integrals extended
|
||||
Domain of elliptic integrals extended.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
sin_pi and cos_pi performance improvements
|
||||
sin_pi and cos_pi performance improvements.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Forward-mode automatic differentiation
|
||||
Forward-mode automatic differentiation.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Vector valued barycentric rational interpolation
|
||||
Vector valued barycentric rational interpolation.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Ooura's method for evaluation of Fourier integrals
|
||||
Ooura's method for evaluation of Fourier integrals.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Multiple compatibility issues with Multiprecision fixed
|
||||
Multiple compatibility issues with Multiprecision fixed.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Lambert-W fixed on a rare architecture
|
||||
Lambert-W fixed on a rare architecture.
|
||||
</li>
|
||||
</ul></div>
|
||||
<h5>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="internals/series_evaluation.html">Series Evaluation</a></span></dt>
|
||||
<dt><span class="section"><a href="internals/cf.html">Continued Fraction Evaluation</a></span></dt>
|
||||
<dt><span class="section"><a href="internals/recurrence.html">Tools For 3 Term Recurrence
|
||||
<dt><span class="section"><a href="internals/recurrence.html">Tools For 3-Term Recurrence
|
||||
Relations</a></span></dt>
|
||||
<dt><span class="section"><a href="internals/tuples.html">Tuples</a></span></dt>
|
||||
<dt><span class="section"><a href="internals/minimax.html">Minimax Approximations
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="home" href="../../index.html" title="Math Toolkit 2.10.0">
|
||||
<link rel="up" href="../internals.html" title="Internal tools">
|
||||
<link rel="prev" href="series_evaluation.html" title="Series Evaluation">
|
||||
<link rel="next" href="recurrence.html" title="Tools For 3 Term Recurrence Relations">
|
||||
<link rel="next" href="recurrence.html" title="Tools For 3-Term Recurrence Relations">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
The header <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tools</span><span class="special">/</span><span class="identifier">test</span><span class="special">.</span><span class="identifier">hpp</span></code> is located under <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">include_private</span></code>
|
||||
and is not installed to the usual locations by default, you will need to
|
||||
and is NOT installed to the usual locations by default; you will need to
|
||||
add <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">include_private</span></code> to your compiler's include
|
||||
path in order to use this header.
|
||||
</p></td></tr>
|
||||
@@ -170,10 +170,11 @@
|
||||
<span class="phrase"><a name="math_toolkit.internals.error_test.example"></a></span><a class="link" href="error_test.html#math_toolkit.internals.error_test.example">Example</a>
|
||||
</h5>
|
||||
<p>
|
||||
Suppose we want to test the tgamma and lgamma functions, we can create a
|
||||
two dimensional matrix of test data, each row is one test case, and contains
|
||||
three elements: the input value, and the expected results for the tgamma
|
||||
and lgamma functions respectively.
|
||||
Suppose we want to test the <code class="computeroutput"><span class="identifier">tgamma</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">lgamma</span></code> functions, we
|
||||
can create a two-dimensional matrix of test data, each row is one test case,
|
||||
and contains three elements: the input value, and the expected results for
|
||||
the <code class="computeroutput"><span class="identifier">tgamma</span></code> and <code class="computeroutput"><span class="identifier">lgamma</span></code> functions respectively.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="identifier">TestType</span><span class="special">,</span> <span class="number">3</span><span class="special">>,</span> <span class="identifier">NumberOfTests</span><span class="special">></span>
|
||||
<span class="identifier">factorials</span> <span class="special">=</span> <span class="special">{</span>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
and the Remez Algorithm</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The directory libs/math/minimax contains a command line driven program for
|
||||
The directory libs/math/minimax contains a command-line driven program for
|
||||
the generation of minimax approximations using the Remez algorithm. Both
|
||||
polynomial and rational approximations are supported, although the latter
|
||||
are tricky to converge: it is not uncommon for convergence of rational forms
|
||||
@@ -82,8 +82,9 @@
|
||||
of the approximation: for example if you are approximating a function <span class="emphasis"><em>f(x)</em></span>
|
||||
then it is quite common to use:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">f</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">g</span><span class="special">(</span><span class="identifier">x</span><span class="special">)(</span><span class="identifier">Y</span> <span class="special">+</span> <span class="identifier">R</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span>
|
||||
</pre>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<span class="serif_italic">f(x) = g(x)(Y + R(x))</span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where <span class="emphasis"><em>g(x)</em></span> is the dominant part of <span class="emphasis"><em>f(x)</em></span>,
|
||||
<span class="emphasis"><em>Y</em></span> is some constant, and <span class="emphasis"><em>R(x)</em></span> is
|
||||
@@ -91,7 +92,7 @@
|
||||
compared to |Y|.
|
||||
</p>
|
||||
<p>
|
||||
In this case you would define <span class="emphasis"><em>f</em></span> to return <span class="emphasis"><em>f(x)/g(x)</em></span>
|
||||
In this case you would define <span class="emphasis"><em>f</em></span> to return <span class="serif-italic">f(x)/g(x)</span>
|
||||
and then set the y-offset of the approximation to <span class="emphasis"><em>Y</em></span>
|
||||
(see command line options below).
|
||||
</p>
|
||||
|
||||
@@ -79,8 +79,9 @@
|
||||
<p>
|
||||
The second argument is the precision required, summation will stop when the
|
||||
next term is less than <span class="emphasis"><em>tolerance</em></span> times the result. The
|
||||
deprecated versions of sum_series take an integer number of bits here - internally
|
||||
they just convert this to a tolerance and forward the call.
|
||||
deprecated versions of <code class="computeroutput"><span class="identifier">sum_series</span></code>
|
||||
take an integer number of bits here - internally they just convert this to
|
||||
a tolerance and forward the call.
|
||||
</p>
|
||||
<p>
|
||||
The third argument <span class="emphasis"><em>max_terms</em></span> sets an upper limit on
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
</pre>
|
||||
<p>
|
||||
So it's pretty clear that this fraction shouldn't be used for small values
|
||||
of a and z.
|
||||
of <span class="emphasis"><em>a</em></span> and <span class="emphasis"><em>z</em></span>.
|
||||
</p>
|
||||
<h5>
|
||||
<a name="math_toolkit.internals.test_data.h5"></a>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
|
||||
<link rel="home" href="../../index.html" title="Math Toolkit 2.10.0">
|
||||
<link rel="up" href="../internals.html" title="Internal tools">
|
||||
<link rel="prev" href="recurrence.html" title="Tools For 3 Term Recurrence Relations">
|
||||
<link rel="prev" href="recurrence.html" title="Tools For 3-Term Recurrence Relations">
|
||||
<link rel="next" href="minimax.html" title="Minimax Approximations and the Remez Algorithm">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
</h5>
|
||||
<p>
|
||||
Utility functions for dealing with floating-point arithmetic, includes functions
|
||||
for floating point classification (fpclassify, isnan, isinf etc), sign manipulation,
|
||||
rounding, comparison, and computing the distance between floating point numbers.
|
||||
for floating point classification (<code class="computeroutput"><span class="identifier">fpclassify</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">isnan</span></code>, <code class="computeroutput"><span class="identifier">isinf</span></code>
|
||||
etc), sign manipulation, rounding, comparison, and computing the distance between
|
||||
floating point numbers.
|
||||
</p>
|
||||
<h5>
|
||||
<a name="math_toolkit.main_intro.h1"></a>
|
||||
@@ -45,8 +47,8 @@
|
||||
Width Floating-Point Types</a>
|
||||
</h5>
|
||||
<p>
|
||||
A set of typedefs similar to those provided by <code class="computeroutput"><span class="special"><</span><span class="identifier">cstdint</span><span class="special">></span></code>
|
||||
but for floating-point types.
|
||||
A set of <code class="computeroutput"><span class="keyword">typedef</span></code>s similar to those
|
||||
provided by <code class="computeroutput"><span class="special"><</span><span class="identifier">cstdint</span><span class="special">></span></code> but for floating-point types.
|
||||
</p>
|
||||
<h5>
|
||||
<a name="math_toolkit.main_intro.h2"></a>
|
||||
@@ -54,8 +56,8 @@
|
||||
Constants</a>
|
||||
</h5>
|
||||
<p>
|
||||
A wide range of constants ranging from various multiples of π, fractions, through
|
||||
to euler's constant etc.
|
||||
A wide range of high-precision constants ranging from various multiples of
|
||||
π, fractions, through to Euler's constant etc.
|
||||
</p>
|
||||
<p>
|
||||
These are of course usable from template code, or as non-templates with a simplified
|
||||
@@ -151,7 +153,8 @@
|
||||
</h5>
|
||||
<p>
|
||||
A reasonably comprehensive set of routines for integration (trapezoidal, Gauss-Legendre,
|
||||
Gauss-Kronrod and double-exponential) and differentiation.
|
||||
Gauss-Kronrod and double-exponential) and differentiation. (See also automatic
|
||||
differentiation).
|
||||
</p>
|
||||
<p>
|
||||
The integration routines are all usable for functions returning complex results
|
||||
@@ -163,7 +166,7 @@
|
||||
and Octonions</a>
|
||||
</h5>
|
||||
<p>
|
||||
Quaternion and Octonians as class templates similar to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span></code>.
|
||||
Quaternions and Octonians as class templates similar to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span></code>.
|
||||
</p>
|
||||
<h5>
|
||||
<a name="math_toolkit.main_intro.h10"></a>
|
||||
@@ -172,7 +175,7 @@
|
||||
</h5>
|
||||
<p>
|
||||
Autodiff is a header-only C++ library that facilitates the automaticdifferentiation
|
||||
(forward mode) of mathematical functions of singleand multiple variables
|
||||
(forward mode) of mathematical functions of single and multiple variables.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
All math functions and distributions are in <code class="computeroutput"><span class="keyword">namespace</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span></code>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
So, for example, the Students-t distribution template in <code class="computeroutput"><span class="keyword">namespace</span>
|
||||
@@ -64,8 +64,7 @@
|
||||
<code class="computeroutput"><span class="identifier">min_value</span></code> and <code class="computeroutput"><span class="identifier">epsilon</span></code> are in <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tools</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<a class="link" href="../policy.html" title="Chapter 19. Policies: Controlling Precision, Error Handling etc">Policy</a> and configuration information is in namespace
|
||||
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">policies</span></code>.
|
||||
<a class="link" href="../policy.html" title="Chapter 19. Policies: Controlling Precision, Error Handling etc">Policy</a> and configuration information is in <code class="computeroutput"><span class="keyword">namespace</span></code> <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">policies</span></code>.
|
||||
</p>
|
||||
<div class="tip"><table border="0" summary="Tip">
|
||||
<tr>
|
||||
@@ -77,6 +76,15 @@
|
||||
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span></code>.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<div class="tip"><table border="0" summary="Tip">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../doc/src/images/tip.png"></td>
|
||||
<th align="left">Tip</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
Start your work from a copy of the example source code; links usually provided.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<a name="math_toolkit.navigation"></a><a class="link" href="navigation.html" title="Navigation">Navigation</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
<a class="indexterm" name="id1007587"></a>
|
||||
<a class="indexterm" name="id1001129"></a>
|
||||
</p>
|
||||
<p>
|
||||
Boost.Math documentation is provided in both HTML and PDF formats.
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
Improve testing.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Rewrite input operatore using Spirit (creates a dependency).
|
||||
Rewrite input operators using Spirit (creates a dependency).
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Put in place an Expression Template mechanism (perhaps borrowing from uBlas).
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">value_type</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
These provide easy acces to the type the template is built upon.
|
||||
These provide easy access to the type the template is built upon.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
||||
@@ -112,7 +112,38 @@
|
||||
<code class="computeroutput"><span class="keyword">float</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
And for user-defined types, all of the following return an <code class="computeroutput"><span class="identifier">NTL</span><span class="special">::</span><span class="identifier">RR</span></code> result:
|
||||
And for user-defined types, typically <a href="../../../../../libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>,
|
||||
</p>
|
||||
<p>
|
||||
All of the following return a <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_bin_quad_float</span></code>
|
||||
result:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cyl_bessel_j</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_bin_quad_float</span><span class="special">(</span><span class="number">2</span><span class="special">));</span>
|
||||
|
||||
<span class="identifier">cyl_bessel_j</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_bin_quad_float</span><span class="special">(</span><span class="number">2</span><span class="special">),</span> <span class="number">3</span><span class="special">);</span>
|
||||
|
||||
<span class="identifier">cyl_bessel_j</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_bin_quad_float</span><span class="special">(</span><span class="number">2</span><span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_bin_quad_float</span><span class="special">(</span><span class="number">3</span><span class="special">));</span>
|
||||
</pre>
|
||||
<p>
|
||||
but rely on the parameters provided being exactly representable, avoiding loss
|
||||
of precision from construction from <code class="computeroutput"><span class="keyword">double</span></code>.
|
||||
</p>
|
||||
<div class="tip"><table border="0" summary="Tip">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../doc/src/images/tip.png"></td>
|
||||
<th align="left">Tip</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
All new projects should use Boost.Multiprecision.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
During development of Boost.Math, <a href="http://www.shoup.net/ntl/" target="_top">NTL
|
||||
A Library for doing Number Theory</a> was invaluable to create highly precise
|
||||
tables.
|
||||
</p>
|
||||
<p>
|
||||
All of the following return an <code class="computeroutput"><span class="identifier">NTL</span><span class="special">::</span><span class="identifier">RR</span></code> result:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cyl_bessel_j</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="identifier">NTL</span><span class="special">::</span><span class="identifier">RR</span><span class="special">(</span><span class="number">2</span><span class="special">));</span>
|
||||
|
||||
|
||||
@@ -112,9 +112,10 @@
|
||||
</p>
|
||||
<p>
|
||||
For example, the binomial distribution probability distribution function
|
||||
(PDF) is written as <span class="emphasis"><em>f(k| n, p)</em></span> = Pr(K = k|n, p)
|
||||
= probability of observing k successes out of n trials. K is the <a href="http://en.wikipedia.org/wiki/Random_variable" target="_top">random variable</a>,
|
||||
k is the <a href="http://en.wikipedia.org/wiki/Random_variate" target="_top">random
|
||||
(PDF) is written as <span class="serif_italic"><span class="emphasis"><em>f(k| n, p)</em></span>
|
||||
= Pr(K = k|n, p) = </span> probability of observing k successes out
|
||||
of n trials. K is the <a href="http://en.wikipedia.org/wiki/Random_variable" target="_top">random
|
||||
variable</a>, k is the <a href="http://en.wikipedia.org/wiki/Random_variate" target="_top">random
|
||||
variate</a>, the parameters are n (trials) and p (probability).
|
||||
</p>
|
||||
</td></tr>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
two standard deviations:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
F = s<sub>1</sub><sup>2</sup> / s<sub>2</sub><sup>2</sup>
|
||||
<span class="serif_italic">F = s<sub>1</sub><sup>2</sup> / s<sub>2</sub><sup>2</sup></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
where s<sub>1</sub> is the standard deviation of the first sample and s<sub>2</sub>
|
||||
@@ -180,12 +180,12 @@ is the standard
|
||||
function:
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
F<sub>(1-alpha; N1-1, N2-1)</sub> = <code class="computeroutput"><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">fisher_f</span><span class="special">(</span><span class="identifier">N1</span><span class="special">-</span><span class="number">1</span><span class="special">,</span>
|
||||
<span class="identifier">N2</span><span class="special">-</span><span class="number">1</span><span class="special">),</span> <span class="identifier">alpha</span><span class="special">)</span></code>
|
||||
<span class="serif_italic">F<sub>(1-alpha; N1-1, N2-1)</sub> = <code class="computeroutput"><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">fisher_f</span><span class="special">(</span><span class="identifier">N1</span><span class="special">-</span><span class="number">1</span><span class="special">,</span>
|
||||
<span class="identifier">N2</span><span class="special">-</span><span class="number">1</span><span class="special">),</span> <span class="identifier">alpha</span><span class="special">)</span></code></span>
|
||||
</p></blockquote></div>
|
||||
<div class="blockquote"><blockquote class="blockquote"><p>
|
||||
F<sub>(alpha; N1-1, N2-1)</sub> = <code class="computeroutput"><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">fisher_f</span><span class="special">(</span><span class="identifier">N1</span><span class="special">-</span><span class="number">1</span><span class="special">,</span>
|
||||
<span class="identifier">N2</span><span class="special">-</span><span class="number">1</span><span class="special">),</span> <span class="identifier">alpha</span><span class="special">))</span></code>
|
||||
<span class="serif_italic">F<sub>(alpha; N1-1, N2-1)</sub> = <code class="computeroutput"><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">fisher_f</span><span class="special">(</span><span class="identifier">N1</span><span class="special">-</span><span class="number">1</span><span class="special">,</span>
|
||||
<span class="identifier">N2</span><span class="special">-</span><span class="number">1</span><span class="special">),</span> <span class="identifier">alpha</span><span class="special">))</span></code></span>
|
||||
</p></blockquote></div>
|
||||
<p>
|
||||
In our example program we need both upper and lower critical values for
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</p>
|
||||
<p>
|
||||
Use of the class requires a <code class="computeroutput"><span class="identifier">Point</span></code>-type
|
||||
which has size known at compile time. These requirements are satisfied by (for
|
||||
which has size known at compile-time. These requirements are satisfied by (for
|
||||
example) <code class="computeroutput"><span class="identifier">Eigen</span><span class="special">::</span><span class="identifier">Vector2d</span></code>s and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="identifier">Real</span><span class="special">,</span> <span class="identifier">N</span><span class="special">></span></code> classes. The call to the constructor computes
|
||||
the weights:
|
||||
</p>
|
||||
|
||||
@@ -61,10 +61,10 @@
|
||||
smooth, but has linear complexity in the data, making it slow relative to compactly-supported
|
||||
b-splines. In addition, we cannot pass an infinite amount of data into the
|
||||
class, and must truncate the (perhaps) infinite sinc series to a finite number
|
||||
of terms. Since the sinc function has slow 1/x decay, the truncation of the
|
||||
series can incur large error. Hence this interpolator works best when operating
|
||||
on samples of compactly supported functions. Here is an example of interpolating
|
||||
a smooth "bump function":
|
||||
of terms. Since the sinc function has slow <span class="emphasis"><em>1/x</em></span> decay,
|
||||
the truncation of the series can incur large error. Hence this interpolator
|
||||
works best when operating on samples of compactly-supported functions. Here
|
||||
is an example of interpolating a smooth "bump function":
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">bump</span> <span class="special">=</span> <span class="special">[](</span><span class="keyword">double</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">>=</span> <span class="number">1</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="number">0.0</span><span class="special">;</span> <span class="special">}</span> <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">exp</span><span class="special">(-</span><span class="number">1.0</span><span class="special">/(</span><span class="number">1.0</span><span class="special">-</span><span class="identifier">x</span><span class="special">*</span><span class="identifier">x</span><span class="special">));</span> <span class="special">};</span>
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
<span class="identifier">v</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">bump</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
|
||||
|
||||
<span class="keyword">auto</span> <span class="identifier">ws</span> <span class="special">=</span> <span class="identifier">whittaker_shannon</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">move</span><span class="special">(</span><span class="identifier">v</span><span class="special">),</span> <span class="identifier">t0</span><span class="special">,</span> <span class="identifier">h</span><span class="special">);</span>
|
||||
|
||||
<span class="keyword">double</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">ws</span><span class="special">(</span><span class="number">0.3</span><span class="special">);</span>
|
||||
@@ -96,7 +95,7 @@
|
||||
</h4>
|
||||
<p>
|
||||
The call to the constructor requires 𝑶(1) operations, simply moving data into
|
||||
the class. Each call the the interpolant is 𝑶(<span class="emphasis"><em>n</em></span>), where
|
||||
the class. Each call to the interpolant is 𝑶(<span class="emphasis"><em>n</em></span>), where
|
||||
<span class="emphasis"><em>n</em></span> is the number of points to interpolate.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -166,7 +166,7 @@ So now we can implement Q, this time using [^continued_fraction_a]:
|
||||
|
||||
[cf_gamma_Q]
|
||||
|
||||
[endsect][/section:cf Continued Fraction Evaluation]
|
||||
[endsect] [/section:cf Continued Fraction Evaluation]
|
||||
|
||||
[/
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[section:minimax Minimax Approximations and the Remez Algorithm]
|
||||
|
||||
The directory libs/math/minimax contains a command line driven
|
||||
The directory libs/math/minimax contains a command-line driven
|
||||
program for the generation of minimax approximations using the Remez
|
||||
algorithm. Both polynomial and rational approximations are supported,
|
||||
although the latter are tricky to converge: it is not uncommon for
|
||||
@@ -12,10 +12,8 @@ is often not an easy task, and one to which many books have been devoted.
|
||||
To use this tool, you will need to have a reasonable grasp of what the Remez
|
||||
algorithm is, and the general form of the approximation you want to achieve.
|
||||
|
||||
Unless you already familar with the Remez method,
|
||||
you should first read the [link math_toolkit.remez
|
||||
brief background article explaining the principles behind the
|
||||
Remez algorithm].
|
||||
Unless you already familar with the Remez method, you should first read the
|
||||
[link math_toolkit.remez brief background article explaining the principles behind the Remez algorithm].
|
||||
|
||||
The program consists of two parts:
|
||||
|
||||
@@ -41,13 +39,13 @@ Note that the function /f/ must return the rational part of the
|
||||
approximation: for example if you are approximating a function
|
||||
/f(x)/ then it is quite common to use:
|
||||
|
||||
f(x) = g(x)(Y + R(x))
|
||||
[expression f(x) = g(x)(Y + R(x))]
|
||||
|
||||
where /g(x)/ is the dominant part of /f(x)/, /Y/ is some constant, and
|
||||
/R(x)/ is the rational approximation part, usually optimised for a low
|
||||
absolute error compared to |Y|.
|
||||
|
||||
In this case you would define /f/ to return ['f(x)/g(x)] and then set the
|
||||
In this case you would define /f/ to return [role serif-italic f(x)/g(x)] and then set the
|
||||
y-offset of the approximation to /Y/ (see command line options below).
|
||||
|
||||
Many other forms are possible, but in all cases the objective is to
|
||||
@@ -156,8 +154,7 @@ Command line options for the program are as follows:
|
||||
x and y offsets, and of course the coefficients of the polynomials.]]
|
||||
]
|
||||
|
||||
|
||||
[endsect][/section:minimax Minimax Approximations and the Remez Algorithm]
|
||||
[endsect] [/section:minimax Minimax Approximations and the Remez Algorithm]
|
||||
|
||||
[/
|
||||
Copyright 2006 John Maddock and Paul A. Bristow.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user