PDFLIB
Evaluate and Sample Probability Density Functions
PDFLIB
is a FORTRAN90 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 FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
LOG_NORMAL_TRUNCATED_AB,
a FORTRAN90 library which
returns quantities associated with the log normal Probability
Distribution Function (PDF) truncated to the interval [A,B].
PROB,
a FORTRAN90 library which
evaluates, samples and inverts a number of
Probability Density Functions (PDF's).
RANLIB,
a FORTRAN90 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 FORTRAN90 library which
implements a random number generator (RNG) with splitting facilities,
allowing multiple independent streams to be computed,
by L'Ecuyer and Cote.
WALKER_SAMPLE,
a FORTRAN90 library which
efficiently samples a discrete probability vector using
Walker sampling.
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_EXPONENTIAL_PDF evaluates the PDF of an exponential distribution.
-
R8_EXPONENTIAL_SAMPLE samples the exponential PDF.
-
R8_EXPONENTIAL_01_PDF: PDF of a 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 an inverse chi-squared distribution.
-
R8_INVGAM_PDF evaluates the PDF of an inverse gamma distribution.
-
R8_INVGAM_SAMPLE samples an inverse gamma distribution.
-
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 returns a unit pseudonormal R8.
-
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_PODET computes the determinant of a factored positive definite matrix.
-
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_MULTINORMAL_PDF evaluates a multivariate normal PDF.
-
R8VEC_MULTINORMAL_SAMPLE samples a multivariate normal PDF.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 10 June 2013.