JWS C Library
C language utility library
|
Definitions for univariate probability density functions. More...
#include <jwsc/config.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include "jwsc/base/limits.h"
#include "jwsc/math/constants.h"
#include "jwsc/math/slatec.h"
#include "jwsc/prob/pdf.h"
Go to the source code of this file.
Defines | |
#define | SQRT_2_PI_SINGLE 2.5066282746310004f |
Single precision sqrt of two pi. | |
#define | SQRT_2_PI_DOUBLE 2.50662827463100050241576528481103 |
Double precision sqrt of two pi. | |
#define | INV_SQRT_2_PI_SINGLE 0.3989422804014326f |
Single precision inverse sqrt of two pi. | |
#define | INV_SQRT_2_PI_DOUBLE 0.39894228040143267793994605993438 |
Double precision inverse sqrt of two pi. | |
#define | LOG_SQRT_2_PI_SINGLE 0.9189385332046727 |
Single precision log sqrt of two pi. | |
#define | LOG_SQRT_2_PI_DOUBLE .91893853320467274178032973640561 |
Double precision log sqrt of two pi. | |
Functions | |
standard_gaussian_pdf | |
Computes the univariate standard Gaussian pdf at a point. | |
float | standard_gaussian_pdf_f (float x) |
Computes the single precision univariate standard Gaussian pdf at a point. | |
double | standard_gaussian_pdf_d (double x) |
Computes the double precision univariate standard Gaussian pdf at a point. | |
gaussian_pdf | |
Computes the univariate Gaussian pdf at a point. | |
float | gaussian_pdf_f (float mu, float sigma, float x) |
Computes the single precision univariate Gaussian pdf at a point. | |
double | gaussian_pdf_d (double mu, double sigma, double x) |
Computes the double precision univariate Gaussian pdf at a point. | |
log_standard_gaussian_pdf | |
Computes the log of the univariate standard Gaussian pdf at a point. | |
float | log_standard_gaussian_pdf_f (float x) |
Computes the single precision log of the univariate standard Gaussian pdf at a point. | |
double | log_standard_gaussian_pdf_d (double x) |
Computes the double precision log of the univariate standard Gaussian pdf at a point. | |
log_gaussian_pdf | |
Computes the log of the univariate Gaussian pdf at a point. | |
float | log_gaussian_pdf_f (float mu, float sigma, float x) |
Computes the single precision log of the univariate Gaussian pdf at a point. | |
double | log_gaussian_pdf_d (double mu, double sigma, double x) |
Computes the double precision log of the univariate Gaussian pdf at a point. | |
sample_standard_gaussian_pdf | |
Draws a random sample from the standard Gaussian pdf. | |
float | sample_standard_gaussian_pdf_f (float a, float b) |
Draws a single precision random sample from the standard Gaussian pdf. | |
double | sample_standard_gaussian_pdf_d (double a, double b) |
Draws a double precision random sample from the standard Gaussian pdf. | |
sample_gaussian_pdf | |
Draws a random sample from the Gaussian pdf. | |
float | sample_gaussian_pdf_f (float mu, float sigma, float a, float b) |
Draws a single precision random sample from the Gaussian pdf. | |
double | sample_gaussian_pdf_d (double mu, double sigma, double a, double b) |
Draws a double precision random sample from the Gaussian pdf. | |
sample_uniform_pdf | |
Draws a random sample from the Uniform pdf. | |
float | sample_uniform_pdf_f (float a, float b) |
Draws a single precision random sample from the Uniform pdf. | |
double | sample_uniform_pdf_d (double a, double b) |
Draws a double precision random sample from the Uniform pdf. | |
sample_sine_pdf | |
Draws a random sample from the Sine pdf over the interval [0,PI/2]. | |
float | sample_sine_pdf_f () |
Draws a single precision random sample from the Sine pdf over the interval [0,PI/2]. | |
double | sample_sine_pdf_d () |
Draws a double precision random sample from the Sine pdf over the interval [0.PI/2]. |
Definitions for univariate probability density functions.
Definition in file pdf.c.
#define SQRT_2_PI_SINGLE 2.5066282746310004f |
#define SQRT_2_PI_DOUBLE 2.50662827463100050241576528481103 |
#define INV_SQRT_2_PI_SINGLE 0.3989422804014326f |
#define INV_SQRT_2_PI_DOUBLE 0.39894228040143267793994605993438 |
#define LOG_SQRT_2_PI_SINGLE 0.9189385332046727 |
#define LOG_SQRT_2_PI_DOUBLE .91893853320467274178032973640561 |
float standard_gaussian_pdf_f | ( | float | x | ) |
double standard_gaussian_pdf_d | ( | double | x | ) |
float gaussian_pdf_f | ( | float | mu, |
float | sigma, | ||
float | x | ||
) |
double gaussian_pdf_d | ( | double | mu, |
double | sigma, | ||
double | x | ||
) |
float log_standard_gaussian_pdf_f | ( | float | x | ) |
double log_standard_gaussian_pdf_d | ( | double | x | ) |
float log_gaussian_pdf_f | ( | float | mu, |
float | sigma, | ||
float | x | ||
) |
double log_gaussian_pdf_d | ( | double | mu, |
double | sigma, | ||
double | x | ||
) |
float sample_standard_gaussian_pdf_f | ( | float | a, |
float | b | ||
) |
Draws a single precision random sample from the standard Gaussian pdf.
a | Lower bound of the sampling interval. |
b | Upper bound of the sampling interval. |
double sample_standard_gaussian_pdf_d | ( | double | a, |
double | b | ||
) |
Draws a double precision random sample from the standard Gaussian pdf.
a | Lower bound of the sampling interval. |
b | Upper bound of the sampling interval. |
float sample_gaussian_pdf_f | ( | float | mu, |
float | sigma, | ||
float | a, | ||
float | b | ||
) |
Draws a single precision random sample from the Gaussian pdf.
mu | Mean of the Gaussian. |
sigma | Standard deviation of the Gaussian |
a | Lower bound of the sampling interval. |
b | Upper bound of the sampling interval. |
double sample_gaussian_pdf_d | ( | double | mu, |
double | sigma, | ||
double | a, | ||
double | b | ||
) |
Draws a double precision random sample from the Gaussian pdf.
mu | Mean of the Gaussian. |
sigma | Standard deviation of the Gaussian |
a | Lower bound of the sampling interval. |
b | Upper bound of the sampling interval. |
float sample_uniform_pdf_f | ( | float | a, |
float | b | ||
) |
Draws a single precision random sample from the Uniform pdf.
a | Lower bound of the sampling interval. |
b | Upper bound of the sampling interval. |
double sample_uniform_pdf_d | ( | double | a, |
double | b | ||
) |
Draws a double precision random sample from the Uniform pdf.
a | Lower bound of the sampling interval. |
b | Upper bound of the sampling interval. |
float sample_sine_pdf_f | ( | ) |
Draws a single precision random sample from the Sine pdf over the interval [0,PI/2].
double sample_sine_pdf_d | ( | ) |
Draws a double precision random sample from the Sine pdf over the interval [0.PI/2].