truncated_normal_rule


truncated_normal_rule, a C++ code which computes a quadrature rule for a normal probability density function (PDF), sometimes called a Gaussian distribution, that has been truncated to [A,+oo), (-oo,B] or [A,B].

Licensing:

The computer code and data files made available on this web page are distributed under the MIT license

Languages:

truncated_normal_rule 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:

CHEBYSHEV1_RULE, a C++ code which can compute and print a Gauss-Chebyshev type 1 quadrature rule.

CHEBYSHEV2_RULE, a C++ code which can compute and print a Gauss-Chebyshev type 2 quadrature rule.

CLENSHAW_CURTIS_RULE, a C++ code which defines a Clenshaw Curtis quadrature rule.

GEGENBAUER_RULE, a C++ code which can compute and print a Gauss-Gegenbauer quadrature rule.

GEN_HERMITE_RULE, a C++ code which can compute and print a generalized Gauss-Hermite quadrature rule.

GEN_LAGUERRE_RULE, a C++ code which can compute and print a generalized Gauss-Laguerre quadrature rule.

HERMITE_RULE, a C++ code which can compute and print a Gauss-Hermite quadrature rule.

JACOBI_RULE, a C++ code which can compute and print a Gauss-Jacobi quadrature rule.

LAGUERRE_RULE, a C++ code which can compute and print a Gauss-Laguerre quadrature rule.

LEGENDRE_RULE, a C++ code which can compute and print a Gauss-Legendre quadrature rule.

LINE_FELIPPA_RULE, a C++ code which returns the points and weights of a Felippa quadrature rule over the interior of a line segment in 1D.

PATTERSON_RULE, a C++ code which computes a Gauss-Patterson quadrature rule.

QUADRULE, a C++ code which defines 1-dimensional quadrature rules.

TRUNCATED_NORMAL, a C++ code which works with the truncated normal distribution over [A,B], or [A,+oo) or (-oo,B], returning the probability density function (PDF), the cumulative density function (CDF), the inverse CDF, the mean, the variance, and sample values.

truncated_normal_rule_test

Reference:

  1. Gene Golub, John Welsch,
    Calculation of Gaussian Quadrature Rules,
    Mathematics of Computation,
    Volume 23, Number 106, April 1969, pages 221-230.
  2. Norman Johnson, Samuel Kotz, Narayanaswamy Balakrishnan,
    Continuous Univariate Distributions,
    Second edition,
    Wiley, 1994,
    ISBN: 0471584940,
    LC: QA273.6.J6.

Source Code:


Last revised on 06 May 2020.