PDFLIB
Evaluate and Sample Probability Density Functions
PDFLIB
is a C++ library which
evaluates Probability Density Functions (PDF's)
and produces random samples from them,
including beta, binomial, chi, exponential, gamma, inverse chi,
inverse gamma, multinomial, normal, scaled inverse chi, and uniform.
Licensing:
The computer code and data files made available on this
web page are distributed under
the GNU LGPL license.
Languages:
PDFLIB is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
PROB,
a C++ library which
evaluates, samples and inverts a number of
Probability Density Functions (PDF's).
RANLIB,
a C++ library which
produces random samples from Probability Density Functions (PDF's),
including Beta, Chi-square Exponential, F, Gamma, Multivariate normal,
Noncentral chi-square, Noncentral F, Univariate normal,
random permutations, Real uniform, Binomial, Negative Binomial,
Multinomial, Poisson and Integer uniform,
by Barry Brown and James Lovato.
RNGLIB,
a C++ library which
implements a random number generator (RNG) with splitting facilities,
allowing multiple independent streams to be computed,
by L'Ecuyer and Cote.
Source Code:
Examples and Tests:
List of Routines:
-
I4_BINOMIAL_PDF evaluates the binomial PDF.
-
I4_BINOMIAL_SAMPLE generates a binomial random deviate.
-
I4VEC_MULTINOMIAL_PDF evaluates the multinomial PDF.
-
I4VEC_MULTINOMIAL_SAMPLE generates a multinomial random deviate.
-
R8_BETA_PDF evaluates the PDF of a beta distribution.
-
R8_BETA_SAMPLE generates a beta random deviate.
-
R8_CHI_PDF evaluates the PDF of a chi-squared distribution.
-
R8_CHI_SAMPLE generates a Chi-Square random deviate.
-
R8_CHOOSE computes the binomial coefficient C(N,K) as an R8.
-
R8_EPSILON returns the R8 roundoff unit.
-
R8_EXPONENTIAL_PDF evaluates the PDF of an exponential distribution.
-
R8_EXPONENTIAL_SAMPLE samples the exponential PDF.
-
R8_EXPONENTIAL_01_PDF: PDF of the standard exponential distribution.
-
R8_EXPONENTIAL_01_SAMPLE samples the standard exponential PDF.
-
R8_GAMMA_LOG evaluates the logarithm of the gamma function.
-
R8_GAMMA_PDF evaluates the PDF of a gamma distribution.
-
R8_GAMMA_SAMPLE generates a Gamma random deviate.
-
R8_GAMMA_01_PDF evaluates the PDF of a standard gamma distribution.
-
R8_GAMMA_01_SAMPLE samples the standard Gamma distribution.
-
R8_INVCHI_PDF evaluates the PDF of an inverse chi-squared distribution.
-
R8_INVCHI_SAMPLE samples the inverse chi-squared distribution.
-
R8_INVGAM_PDF evaluates the PDF of an inverse gamma distribution.
-
R8_INVGAM_SAMPLE samples an inverse gamma distribution.
-
R8_MAX returns the maximum of two R8's.
-
R8_MIN returns the minimum of two R8's.
-
R8_NORMAL_PDF evaluates the PDF of a normal distribution.
-
R8_NORMAL_SAMPLE generates a normal random deviate.
-
R8_NORMAL_01_PDF evaluates the PDF of a standard normal distribution.
-
R8_NORMAL_01_SAMPLE samples the standard normal probability distribution.
-
R8_SCINVCHI_PDF: PDF for a scaled inverse chi-squared distribution.
-
R8_SCINVCHI_SAMPLE: sample a scaled inverse chi-squared distribution.
-
R8_UNIFORM_PDF evaluates the PDF of a uniform distribution.
-
R8_UNIFORM_SAMPLE generates a uniform random deviate.
-
R8_UNIFORM_01_PDF evaluates the PDF of a standard uniform distribution.
-
R8_UNIFORM_01_SAMPLE generates a uniform random deviate from [0,1].
-
R8MAT_MV_NEW multiplies a matrix times a vector.
-
R8MAT_POFAC factors a real symmetric positive definite matrix.
-
R8MAT_POINV computes the inverse of a factored positive definite matrix.
-
R8MAT_UPSOL solves R * X = B, for an upper triangular matrix R.
-
R8MAT_UTSOL solves R' * X = B for an upper triangular matrix R.
-
R8VEC_DOT_PRODUCT computes the dot product of a pair of R8VEC's.
-
R8VEC_MULTINORMAL_PDF evaluates a multivariate normal PDF.
-
R8VEC_MULTINORMAL_SAMPLE samples a multivariate normal PDF.
You can go up one level to
the C++ source codes.
Last revised on 05 August 2013.