LibRan  0.1
Pseudo-random number distribution generator
Data Structures | Macros | Typedefs | Enumerations | Functions
libran.h File Reference

The LibRan common header file. More...

#include <stdarg.h>
Include dependency graph for libran.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  LR_val
 spans the set of allowed value types More...
 
struct  LR_obj
 the fundamental LibRan random variate distribution object More...
 
struct  LR_bin
 the binning object - for tallying results More...
 
struct  LR_pcs
 A special object for defining some of the random variate distributions. More...
 
struct  LR_uinvcdf
 A special object for using a user defined CDF. More...
 

Macros

#define LR_VER_MAJOR   0
 
#define LR_VER_MINOR   5
 
#define LR_VER_PATCH   1
 
#define LR_VERSION   LR_VER_MAJOR.LR_VER_MINOR.LR_VER_PATCH
 LibRan Library Version (X.Y.Z)
 
#define LR_DATE   20191201
 LibRan Library date (YYYYMMDD)
 
#define LRerr_OK   0x00
 
#define LRerr_Unspecified   0x01
 
#define LRerr_BadDataType   0x03
 
#define LRerr_BadLRType   0x05
 
#define LRerr_NoAuxiliaryObject   0x09
 
#define LRerr_NoAuxNormalizeDone   0x0B
 
#define LRerr_BadAuxSetup   0x0D
 
#define LRerr_BinGeneric   0x11
 
#define LRerr_TooManyValues   0x13
 
#define LRerr_InvalidInputValue   0x15
 
#define LRerr_InvalidRange   0x17
 
#define LRerr_UnmetPreconditions   0x19
 
#define LRerr_SuspiciousValues   0x1B
 
#define LRerr_AllocFail   0x1D
 
#define LRerr_InvalidCDF   0x21
 
#define LR_AUX_NORM   0x01
 
#define LR_AUX_SET   0x02
 

Typedefs

typedef struct LR_obj LR_obj
 the fundamental LibRan distribution object - the LR_obj struct
 

Enumerations

enum  LR_type {
  poisson = 1, geometric, binomial, unif,
  piece, lspline, uinvcdf, gausbm,
  gausmar, gsn2, gsn4, gsn12,
  logd, nexp, erlang, cauchy,
  cauchymar
}
 an enum of allowed random variate distribution types More...
 
enum  LR_data_type { LR_int = 1, LR_long, LR_float, LR_double }
 an enum of allowed value types More...
 

Functions

LR_objLR_new (LR_type t, LR_data_type d)
 LR_new(LR_type t, LR_data_type d) - create the LR object and preset some default parameter values. More...
 
int LR_rm (LR_obj **o)
 LR_rm(LR_obj **o) - destroy the LR object and release allocated memory. More...
 
int LR_check (LR_obj *o)
 LR_check(LR_obj *o) - check and fix the LR object parameters if possible. More...
 
int LR_vset (LR_obj *o, char *x, va_list ap)
 LR_vset(LR_obj *o, char *x, va_list ap) - read and parse options. More...
 
int LR_set (LR_obj *o, char x,...)
 LR_set(LR_obj *o, char x, ...) - set a single LR object parameter. More...
 
int LR_set_all (LR_obj *o, char *x,...)
 LR_set_all(LR_obj *o, char *x, ...) - set all given LR object parameters. More...
 
LR_binLR_bin_new (int n)
 LR_bin_new(LR_data_type d, int n) - create new binning object. More...
 
int LR_bin_rm (LR_bin **b)
 LR_bin_rm(LR_bin **b) - remove binning object. More...
 
int LR_bin_set (LR_bin *b, double x)
 LR_bin_set(LR_bin *b, double x) - add bin boundary. More...
 
int LR_bin_add (LR_bin *b, double x)
 LR_bin_add(LR_bin *b, double x) - collect value to be binned. More...
 
char * LRstrerror (int LRerrno)
 LRstrerror(int LRerrno) - return some explanatory text regarding the given LibRan errno. More...
 
char * LRstrerrno (int LRerrno)
 LRstrerrno(int LRerrno) - return the errno code string for the given LibRan errno. More...
 
void LRperror (char *str, int LRerrno)
 LRperror(char *str, int LRerrno) - print out explanatory error message to stderr. More...
 
char * LRversion (char *str)
 
int LR_irand (LR_obj *)
 LR_irand(LR_obj *) - returns int in range [0,LR_IRAND_IMAX]. More...
 
float LR_frand (LR_obj *)
 LR_frand(LR_obj *) - returns float in range [0.0,1.0) More...
 
void LR_isetseed (LR_obj *, int ity)
 LR_isetseed(LR_obj *, int X) - set the seed to X. More...
 
int LR_igetseed (LR_obj *)
 LR_igetseed(LR_obj *) - get the current seed. More...
 
int LR_igetrand (LR_obj *)
 LR_igetrand(LR_obj *) - get the current pseudo-random number. More...
 
float LR_fgetrand (LR_obj *)
 LR_fgetrand(LR_obj *) - get the current pseudo-random number. More...
 
long LR_lrand (LR_obj *)
 LR_lrand(LR_obj *) - returns long in range [0,LR_IRAND_LMAX]. More...
 
double LR_drand (LR_obj *)
 LR_drand(LR_obj *) - returns double in range [0.0,1.0) More...
 
void LR_lsetseed (LR_obj *, long lty)
 LR_lsetseed(LR_obj *, long X) - set the seed to X. More...
 
long LR_lgetseed (LR_obj *)
 LR_lgetseed(LR_obj *) - get the current seed. More...
 
long LR_lgetrand (LR_obj *)
 LR_lgetrand(LR_obj *) - get the current pseudo-random number. More...
 
double LR_dgetrand (LR_obj *)
 LR_dgetrand(LR_obj *) - get the current pseudo-random number. More...
 
int LR_igetval (char *str)
 LR_igetval(char *val) - return the configure value. More...
 
long LR_lgetval (char *str)
 LR_lgetval(char *val) - return the configure value. More...
 
float LR_fgetval (char *str)
 LR_fgetval(char *val) - return the configure value. More...
 
double LR_dgetval (char *str)
 LR_dgetval(char *val) - return the configure value. More...
 
double LRd_RAN (LR_obj *o)
 LRd_RAN(LR_obj *o) - random variate generator. More...
 
double LRd_PDF (LR_obj *o, double x)
 LRd_PDF(LR_obj *o, double x) - probability distribution function. More...
 
double LRd_CDF (LR_obj *o, double x)
 LRd_CDF(LR_obj *o, double x) - cumulative distribution function. More...
 
float LRf_RAN (LR_obj *o)
 LRf_RAN(LR_obj *o) - random variate generator. More...
 
float LRf_PDF (LR_obj *o, float x)
 LRf_PDF(LR_obj *o, float x) - probability distribution function. More...
 
float LRf_CDF (LR_obj *o, float x)
 LRf_CDF(LR_obj *o, float x) - cumulative distribution function. More...
 
int LRi_RAN (LR_obj *o)
 LRi_RAN(LR_obj *o) - random variate generator. More...
 
float LRi_PDF (LR_obj *o, int x)
 LRi_PDF(LR_obj *o, int x) - probability distribution function. More...
 
float LRi_CDF (LR_obj *o, int x)
 LRi_CDF(LR_obj *o, int x) - cumulative distribution function. More...
 
int LR_aux_new (LR_obj *o, int n)
 LR_aux_new(LR_obj *o, int n) - initialize a new auxiliary object. More...
 
int LR_aux_rm (LR_obj *o)
 LR_aux_rm(LR_obj *o) - remove the auxiliary object. More...
 
int LR_aux_set (LR_obj *o, double x, double p)
 LR_aux_set(LR_obj *o, double x, double p) - add an interval boundary for the underlying distribution. More...
 
int LR_aux_norm (LR_obj *o)
 LR_aux_norm(LR_obj *o) - process given intervals and normalize values. More...
 
double LRd_unif_RAN (LR_obj *o)
 LRd_unif_RAN(LR_obj *o) - double random uniform distribution. More...
 
double LRd_unif_PDF (LR_obj *o, double x)
 LRd_unif_PDF(LR_obj *o, double x) - double uniform probablity distribution function. More...
 
double LRd_unif_CDF (LR_obj *o, double x)
 LRd_unif_CDF(LR_obj *o, double x) - double uniform cumulative distribution function. More...
 
float LRf_unif_RAN (LR_obj *o)
 LRf_unif_RAN(LR_obj *o) - float random uniform distribution. More...
 
float LRf_unif_PDF (LR_obj *o, float x)
 LRf_unif_PDF(LR_obj *o, float x) - float uniform probablity distribution function. More...
 
float LRf_unif_CDF (LR_obj *o, float x)
 LRf_unif_CDF(LR_obj *o, float x) - float uniform cumulative distribution function. More...
 
int LR_pcs_new (LR_obj *o, int n)
 LR_pcs_new(LR_obj *o, int n) - create a new piecewise uniform object set of segments. More...
 
int LR_pcs_rm (LR_obj *o)
 LR_pcs_rm(LR_obj *o) - strip out the LR_pcs object part of LR_obj. More...
 
int LR_pcs_set (LR_obj *o, double x, double p)
 LR_pcs_set(LR_obj *o, double x) - add interval boundary (will order internally). More...
 
int LR_pcs_norm (LR_obj *o)
 LR_pcs_norm(LR_obj *o) - normalize the interval scale factors. More...
 
double LRd_piece_RAN (LR_obj *o)
 LRd_piece_RAN(LR_obj *o) - double random piecewise uniform distribution random variate. More...
 
double LRd_piece_PDF (LR_obj *o, double x)
 LRd_piece_PDF(LR_obj *o, double x) - double piecewise uniform probablity distribution function. More...
 
double LRd_piece_CDF (LR_obj *o, double x)
 LRd_piece_CDF(LR_obj *o, double x) - double piecewise uniform cumulative distribution function. More...
 
float LRf_piece_RAN (LR_obj *o)
 LRf_piece_RAN(LR_obj *o) - float random piecewise uniform distribution. More...
 
float LRf_piece_PDF (LR_obj *o, float x)
 LRf_piece_PDF(LR_obj *o, float x) - float piecewise uniform probablity distribution function. More...
 
float LRf_piece_CDF (LR_obj *o, float x)
 LRf_piece_CDF(LR_obj *o, float x) - float piecewise uniform cumulative distribution function. More...
 
int LR_lspl_new (LR_obj *o, int n)
 LR_lspl_new(LR_obj *o, int n) - create a new linear spline object. More...
 
int LR_lspl_rm (LR_obj *o)
 LR_lspl_rm(LR_obj *o) - strip out the LR_lspl object part of LR_obj. More...
 
int LR_lspl_set (LR_obj *o, double x, double p)
 LR_lspl_set(LR_obj *o, double x) - add interval boundary (will order internally). More...
 
int LR_lspl_norm (LR_obj *o)
 LR_lspl_norm(LR_obj *o) - normalize the interval scale factors. More...
 
double LRd_lspline_RAN (LR_obj *o)
 LRd_lspline_RAN(LR_obj *o) - double random linear spline distribution random variate. More...
 
double LRd_lspline_PDF (LR_obj *o, double x)
 LRd_lspline_PDF(LR_obj *o, double x) - double linear spline probablity distribution function. More...
 
double LRd_lspline_CDF (LR_obj *o, double x)
 LRd_lspline_CDF(LR_obj *o, double x) - double linear spline cumulative distribution function. More...
 
float LRf_lspline_RAN (LR_obj *o)
 LRf_lspline_RAN(LR_obj *o) - float random linear spline distribution. More...
 
float LRf_lspline_PDF (LR_obj *o, float x)
 LRf_lspline_PDF(LR_obj *o, float x) - float linear spline probablity distribution function. More...
 
float LRf_lspline_CDF (LR_obj *o, float x)
 LRf_lspline_CDF(LR_obj *o, float x) - float linear spline cumulative distribution function. More...
 
double LRd_uinvcdf_RAN (LR_obj *o)
 LRd_uinvcdf_RAN(LR_obj *o) - double random variate via inverse method of the UserCDF() fn. More...
 
double LRd_uinvcdf_PDF (LR_obj *o, double x)
 LRd_uinvcdf_PDF(LR_obj *o, double x) - double probability distribution function approximated from the user supplied cumulative distribution function. More...
 
double LRd_uinvcdf_CDF (LR_obj *o, double x)
 LRd_uinvcdf_CDF(LR_obj *o, double x) - double User supplied cumulative distribution function. More...
 
int LRd_uinvcdf (LR_obj *o, double(*cdf)(double))
 LRd_uinvcdf() - set the user defined CDF for this variate distribution. More...
 
float LRf_uinvcdf_RAN (LR_obj *o)
 LRf_uinvcdf_RAN(LR_obj *o) - float random variate via inverse method of the UserCDF() fn. More...
 
float LRf_uinvcdf_PDF (LR_obj *o, float x)
 LRf_uinvcdf_PDF(LR_obj *o, float x) - float probability distribution function approximated from the user supplied cumulative distribution function. More...
 
float LRf_uinvcdf_CDF (LR_obj *o, float x)
 LRf_uinvcdf_CDF(LR_obj *o, float x) - float User supplied cumulative distribution function. More...
 
int LRf_uinvcdf (LR_obj *o, float(*cdf)(float))
 LRf_uinvcdf() - set the user defined CDF for this variate distribution. More...
 
double LRd_nexp_RAN (LR_obj *o)
 LRd_nexp_RAN(LR_obj *o) - double random negative exponential distribution using the inversion method. Default values: peak m = 1. More...
 
double LRd_nexp_PDF (LR_obj *o, double x)
 LRd_nexp_PDF(LR_obj *o, double x) - double negative exponential probablity distribution function. More...
 
double LRd_nexp_CDF (LR_obj *o, double x)
 LRd_nexp_CDF(LR_obj *o, double x) - double negative exponential cumulative distribution function. More...
 
float LRf_nexp_RAN (LR_obj *o)
 LRf_nexp_RAN(LR_obj *o) - float random negative exponential distribution using the inversion method. Default values: peak m = 1. More...
 
float LRf_nexp_PDF (LR_obj *o, float x)
 LRf_nexp_PDF(LR_obj *o, float x) - float negative exponential probablity distribution function. More...
 
float LRf_nexp_CDF (LR_obj *o, float x)
 LRf_nexp_CDF(LR_obj *o, float x) - float negative exponential cumulative distribution function. More...
 
double LRd_erlang_RAN (LR_obj *o)
 LRd_erlang_RAN(LR_obj *o) - double random negative exponential distribution using the inversion method. Default values: scale m = 1. More...
 
double LRd_erlang_PDF (LR_obj *o, double x)
 LRd_erlang_PDF(LR_obj *o, double x) - Erlang distribution probablity distribution function. More...
 
double LRd_erlang_CDF (LR_obj *o, double x)
 LRd_erlang_CDF(LR_obj *o, double x) - Erlang distribution cumulative distribution function. More...
 
float LRf_erlang_RAN (LR_obj *o)
 LRf_erlang_RAN(LR_obj *o) - float random negative exponential distribution using the inversion method. Default values: scale m = 1. More...
 
float LRf_erlang_PDF (LR_obj *o, float x)
 LRf_erlang_PDF(LR_obj *o, float x) - Erlang distribution probablity distribution function. More...
 
float LRf_erlang_CDF (LR_obj *o, float x)
 LRf_erlang_CDF(LR_obj *o, float x) - Erlang distribution cumulative distribution function. More...
 
double LRd_gausbm_RAN (LR_obj *o)
 LRd_gausbm_RAN(LR_obj *o) - double random Gaussian/Normal distribution using the Box-Muller method. More...
 
double LRd_gausmar_RAN (LR_obj *o)
 LRd_gausmar_RAN(LR_obj *o) - double random Gaussian/Normal distribution using the Marsaglia method with acceptance-rejection. More...
 
double LRd_gaus_PDF (LR_obj *o, double x)
 LRd_gaus_PDF(LR_obj *o, double x) - double Gaussian/Normal probablity distribution function. More...
 
double LRd_gaus_CDF (LR_obj *o, double x)
 LRd_gaus_CDF(LR_obj *o, double x) - double Gaussian/Normal cumulative distribution function. More...
 
float LRf_gausbm_RAN (LR_obj *o)
 LRf_gausbm_RAN(LR_obj *o) - float random Gaussian/Normal distribution using the Box-Muller method. More...
 
float LRf_gausmar_RAN (LR_obj *o)
 LRf_gausmar_RAN(LR_obj *o) - float random Gaussian/Normal distribution using the Marsaglia method with acceptance-rejection. More...
 
float LRf_gaus_PDF (LR_obj *o, float x)
 LRf_gaus_PDF(LR_obj *o, float x) - float Gaussian/Normal probablity distribution function. More...
 
float LRf_gaus_CDF (LR_obj *o, float x)
 LRf_gaus_CDF(LR_obj *o, float x) - float Gaussian/Normal cumulative distribution function. More...
 
double LRd_gsn2_RAN (LR_obj *o)
 LRd_gsn2_RAN(LR_obj *o) - double random g2 gaussian-like (saw tooth) distribution. More...
 
double LRd_gsn2_PDF (LR_obj *o, double x)
 LRd_gsn2_PDF(LR_obj *o, double x) - double gaussian-like (saw tooth) probablity distribution function. More...
 
double LRd_gsn2_CDF (LR_obj *o, double x)
 LRd_gsn2_CDF(LR_obj *o, double x) - double gaussian-like (saw tooth) cumulative distribution function. More...
 
float LRf_gsn2_RAN (LR_obj *o)
 LRf_gsn2_RAN(LR_obj *o) - float random g2 gaussian-like (saw tooth) distribution. More...
 
float LRf_gsn2_PDF (LR_obj *o, float x)
 LRf_gsn2_PDF(LR_obj *o, float x) - float gaussian-like (saw tooth) probablity distribution function. More...
 
float LRf_gsn2_CDF (LR_obj *o, float x)
 LRf_gsn2_CDF(LR_obj *o, float x) - float gaussian-like (saw tooth) cumulative distribution function. More...
 
double LRd_gsn4_RAN (LR_obj *o)
 LRd_gsn4_RAN(LR_obj *o) - double random g4 gaussian-like (simple bell curve) distribution. More...
 
double LRd_gsn4_PDF (LR_obj *o, double x)
 LRd_gsn4_PDF(LR_obj *o, double x) - double gaussian-like (simple bell curve) probablity distribution function. More...
 
double LRd_gsn4_CDF (LR_obj *o, double x)
 LRd_gsn4_CDF(LR_obj *o, double x) - double gaussian-like (saw tooth) cumulative distribution function. More...
 
float LRf_gsn4_RAN (LR_obj *o)
 LRf_gsn4_RAN(LR_obj *o) - float random g4 gaussian-like (simple bell curve) distribution. More...
 
float LRf_gsn4_PDF (LR_obj *o, float x)
 LRf_gsn4_PDF(LR_obj *o, float x) - float gaussian-like (simple bell curve) probablity distribution function. More...
 
float LRf_gsn4_CDF (LR_obj *o, float x)
 LRf_gsn4_CDF(LR_obj *o, float x) - float gaussian-like (saw tooth) cumulative distribution function. More...
 
double LRd_gsn12_RAN (LR_obj *o)
 LRd_gsn12_RAN(LR_obj *o) - double random g12 gaussian-like distribution closely matches a Gaussian/Normal distribution using the sum of 12 uniform random variates. More...
 
double LRd_gsn12_PDF (LR_obj *o, double x)
 LRd_gsn12_PDF(LR_obj *o, double x) - double gaussian-like (simple bell curve) probablity distribution function. More...
 
double LRd_gsn12_CDF (LR_obj *o, double x)
 LRd_gsn12_CDF(LR_obj *o, double x) - double gaussian-like (simple bell curve) cumulative distribution function. More...
 
double LRd_xgsn12_PDF (LR_obj *o, double x)
 
double LRd_xgsn12_CDF (LR_obj *o, double x)
 
float LRf_gsn12_RAN (LR_obj *o)
 LRf_gsn12_RAN(LR_obj *o) - float random g12 gaussian-like distribution closely matches a Gaussian/Normal distribution using the sum of 12 uniform random variates. More...
 
float LRf_gsn12_PDF (LR_obj *o, float x)
 LRf_gsn12_PDF(LR_obj *o, float x) - float gaussian-like (simple bell curve) probablity distribution function. More...
 
float LRf_gsn12_CDF (LR_obj *o, float x)
 LRf_gsn12_CDF(LR_obj *o, float x) - float gaussian-like (simple bell curve) cumulative distribution function. More...
 
double LRd_cauchy_RAN (LR_obj *o)
 LRd_cauchy_RAN(LR_obj *o) - double random Cauchy/Lorentz distribution using the inversion method on the CDF(x). Default values: peak m = 0, half width s = 1. More...
 
double LRd_cauchymar_RAN (LR_obj *o)
 LRd_cauchymar_RAN(LR_obj *o) - double random Cauchy/Lorentz distribution using the polar method and the Marsagalia method and acceptance/rejection for generating a Gaussian/Normal variate. Default values: peak m = 0, half width s = 1. More...
 
double LRd_cauchy_PDF (LR_obj *o, double x)
 LRd_cauchy_PDF(LR_obj *o, double x) - double Cauchy/Lorentz probablity distribution function. More...
 
double LRd_cauchy_CDF (LR_obj *o, double x)
 LRd_cauchy_CDF(LR_obj *o, double x) - double Cauchy/Lorentz cumulative distribution function. More...
 
float LRf_cauchy_RAN (LR_obj *o)
 LRf_cauchy_RAN(LR_obj *o) - float random Cauchy/Lorentz distribution using the inversion method. Default values: peak m = 0, half width s = 1. More...
 
float LRf_cauchymar_RAN (LR_obj *o)
 LRf_cauchymar_RAN(LR_obj *o) - float random Cauchy/Lorentz distribution using the polar method and the Marsagalia method and acceptance/rejection for generating a Gaussian/Normal variate. Default values: peak m = 0, half width s = 1. More...
 
float LRf_cauchy_PDF (LR_obj *o, float x)
 LRf_cauchy_PDF(LR_obj *o, float x) - float Cauchy/Lorentz probablity distribution function. More...
 
float LRf_cauchy_CDF (LR_obj *o, float x)
 LRf_cauchy_CDF(LR_obj *o, float x) - float Cauchy/Lorentz cumulative distribution function. More...
 
int LRi_poisson_RAN (LR_obj *o)
 LRi_poisson_RAN(LR_obj *o) - int Poisson distributed variate. Default values: scale m = 1. More...
 
float LRi_poisson_PDF (LR_obj *o, int x)
 LRi_poisson_PDF(LR_obj *o, int x) - Poisson probablity (or mass) distribution function. More...
 
float LRi_poisson_CDF (LR_obj *o, int x)
 LRi_poisson_CDF(LR_obj *o, int x) - Poisson distribution cumulative distribution function. More...
 
int LRi_geometric_RAN (LR_obj *o)
 LRi_geometric_RAN(LR_obj *o) - int Geometric distributed variate. Default values: probability of success p = 1/2. More...
 
float LRi_geometric_PDF (LR_obj *o, int x)
 LRi_geometric_PDF(LR_obj *o, int x) - Geometric probablity (or mass) distribution function. More...
 
float LRi_geometric_CDF (LR_obj *o, int x)
 LRi_geometric_CDF(LR_obj *o, int x) - Geometric distribution cumulative distribution function. More...
 
int LRi_binomial_RAN (LR_obj *o)
 LRi_binomial_RAN(LR_obj *o) - int Binomial distributed variate. Default values: probability of success p = 1/2. More...
 
float LRi_binomial_PDF (LR_obj *o, int x)
 LRi_binomial_PDF(LR_obj *o, int k) - Binomial probablity (or mass) distribution function. More...
 
float LRi_binomial_CDF (LR_obj *o, int x)
 LRi_binomial_CDF(LR_obj *o, int k) - Binomial distribution cumulative distribution function. More...
 

Detailed Description

The LibRan common header file.

Definition in file libran.h.

Macro Definition Documentation

◆ LR_AUX_NORM

#define LR_AUX_NORM   0x01

Performed normalization

Definition at line 223 of file libran.h.

◆ LR_AUX_SET

#define LR_AUX_SET   0x02

Performed Aux set

Definition at line 224 of file libran.h.

◆ LRerr_AllocFail

#define LRerr_AllocFail   0x1D

Memory alloc failure

Definition at line 45 of file libran.h.

◆ LRerr_BadAuxSetup

#define LRerr_BadAuxSetup   0x0D

Incomplete auxiliary object

Definition at line 38 of file libran.h.

◆ LRerr_BadDataType

#define LRerr_BadDataType   0x03

Bad data type

Definition at line 34 of file libran.h.

◆ LRerr_BadLRType

#define LRerr_BadLRType   0x05

Bad LibRan variate type

Definition at line 35 of file libran.h.

◆ LRerr_BinGeneric

#define LRerr_BinGeneric   0x11

Generic binning error

Definition at line 39 of file libran.h.

◆ LRerr_InvalidCDF

#define LRerr_InvalidCDF   0x21

CDF is not monotonic, etc.

Definition at line 46 of file libran.h.

◆ LRerr_InvalidInputValue

#define LRerr_InvalidInputValue   0x15

Invalid input value given

Definition at line 41 of file libran.h.

◆ LRerr_InvalidRange

#define LRerr_InvalidRange   0x17

Invalid range given

Definition at line 42 of file libran.h.

◆ LRerr_NoAuxiliaryObject

#define LRerr_NoAuxiliaryObject   0x09

No auxiliary object found

Definition at line 36 of file libran.h.

◆ LRerr_NoAuxNormalizeDone

#define LRerr_NoAuxNormalizeDone   0x0B

Normalization not done

Definition at line 37 of file libran.h.

◆ LRerr_OK

#define LRerr_OK   0x00

LibRan Error NumbersNo error

Definition at line 32 of file libran.h.

◆ LRerr_SuspiciousValues

#define LRerr_SuspiciousValues   0x1B

Something suspicious

Definition at line 44 of file libran.h.

◆ LRerr_TooManyValues

#define LRerr_TooManyValues   0x13

Too many values given

Definition at line 40 of file libran.h.

◆ LRerr_UnmetPreconditions

#define LRerr_UnmetPreconditions   0x19

Prerequisites not met

Definition at line 43 of file libran.h.

◆ LRerr_Unspecified

#define LRerr_Unspecified   0x01

Unknown error

Definition at line 33 of file libran.h.

Enumeration Type Documentation

◆ LR_data_type

an enum of allowed value types

This enum value identifies which data type is to be used within the LibRan object. Then the associated type should be used from the given LR_val attribute.

Enumerator
LR_int 

integer type

LR_long 

long integer type

LR_float 

single precision floating point type

LR_double 

double precision floating type

Definition at line 98 of file libran.h.

◆ LR_type

enum LR_type

an enum of allowed random variate distribution types

Enumerator
poisson 

discrete distributions Poisson

geometric 

Geometric

binomial 

Binomial continuum distributions

unif 

uniform

piece 

piecewise uniform

lspline 

linear spline

uinvcdf 

User inverse CDF

gausbm 

Gaussian (Normal)-Box Muller method

gausmar 

Gaussian (Normal)-Marsaglia method

gsn2 

Gaussian like - 2 uni (saw tooth)

gsn4 

Gaussian like - 4 uni

gsn12 

Gaussian like - 12 uni

logd 

logirithmic

nexp 

negative exponential

erlang 

Erlang

cauchy 

Cauchy

cauchymar 

Cauchy using polar/Marsaglia method

Definition at line 52 of file libran.h.

Function Documentation

◆ LR_aux_new()

int LR_aux_new ( LR_obj o,
int  n 
)

LR_aux_new(LR_obj *o, int n) - initialize a new auxiliary object.

The generic method for creating a new auxiliary object for those random variate distributions that need it. Can be called otherwise but raises an ignorable error.

Parameters
oLR_obj object
nmaxiumum number of intervals
Returns
0 if successful, else non-zero if failed

Definition at line 241 of file LRdf.c.

◆ LR_aux_norm()

int LR_aux_norm ( LR_obj o)

LR_aux_norm(LR_obj *o) - process given intervals and normalize values.

The generic method for normalizing the given intervals for the auxiliary object for those random variate distributions that need it. Can be called otherwise but raises an ignorable error.

Parameters
oLR_obj object
Returns
0 if successful, else non-zero if failed

Definition at line 301 of file LRdf.c.

◆ LR_aux_rm()

int LR_aux_rm ( LR_obj o)

LR_aux_rm(LR_obj *o) - remove the auxiliary object.

The generic method for removing or deallocating an auxiliary object for those random variate distributions that need it. Can be called otherwise but raises an ignorable error.

Parameters
oLR_obj object
Returns
0 if successful, else non-zero if failed

Definition at line 260 of file LRdf.c.

◆ LR_aux_set()

int LR_aux_set ( LR_obj o,
double  x,
double  p 
)

LR_aux_set(LR_obj *o, double x, double p) - add an interval boundary for the underlying distribution.

The generic method for adding an interval boundary for an auxiliary object for those random variate distributions that need it. Can be called otherwise but raises an ignorable error.

Parameters
oLR_obj object
xinterval boundary to add
prelative probablity for interval greater than x
Returns
0 if successful, else non-zero if failed

Definition at line 282 of file LRdf.c.

◆ LR_bin_add()

int LR_bin_add ( LR_bin b,
double  x 
)

LR_bin_add(LR_bin *b, double x) - collect value to be binned.

This is the tallying routine, where the value x is compared to the boundary values and the appropriate bin array element tally is incremented.

Parameters
bLR_bin object
xvalue to count within the given bin.
Returns
0 if successful, else non-zero if failed

Definition at line 178 of file LRbin.c.

◆ LR_bin_new()

LR_bin* LR_bin_new ( int  n)

LR_bin_new(LR_data_type d, int n) - create new binning object.

This routine creates a new LR_bin object and allocates the necessary memory for the boundaries and tally bins. Must give at least the expected number of bins or the number of boundaries plus one.

Parameters
tdata type
nnumber of bins
Returns
LR_bin object if successful, else NULL

Definition at line 81 of file LRbin.c.

◆ LR_bin_rm()

int LR_bin_rm ( LR_bin **  b)

LR_bin_rm(LR_bin **b) - remove binning object.

Since the LR_bin object allocates memory this method needs to be called to deallocate the memory to avoid memory leaks.

Parameters
bLR_bin object address
Returns
0 if successful, else non-zero if failed

Definition at line 116 of file LRbin.c.

◆ LR_bin_set()

int LR_bin_set ( LR_bin b,
double  x 
)

LR_bin_set(LR_bin *b, double x) - add bin boundary.

Include another bin boundary, which will be ordered internally. However, it will not identify or flag repeated boundaries.

Parameters
bLR_bin object
xbin boundary to add
Returns
0 if successful, else non-zero if failed

Definition at line 137 of file LRbin.c.

◆ LR_check()

int LR_check ( LR_obj o)

LR_check(LR_obj *o) - check and fix the LR object parameters if possible.

This method finds and addresses fixable errors. For example for those random variate distributions that use the interval end points (a,b) the check method will switch 'a' and 'b' if 'a' > 'b'. The other example is for those distributions that use 's' which generally relates to the width of the peak. This value should be positive and the check will take the absolute value of this value if negative.

However, non-fixable errors will raise an error, such as a=b in the first case or s=0 for the second case.

Parameters
oLR_obj pointer
Returns
0 if successful, non-zero if an error or not possible to fix

Definition at line 470 of file LRnew.c.

◆ LR_dgetrand()

double LR_dgetrand ( LR_obj o)

LR_dgetrand(LR_obj *) - get the current pseudo-random number.

Get the current pseudo-random number from this LR_obj .

Parameters
oLR_obj object
Returns
double current pseudo-random number

Definition at line 405 of file urand.c.

◆ LR_dgetval()

double LR_dgetval ( char *  val)

LR_dgetval(char *val) - return the configure value.

Return the value computed from the library configuration step, such as LR_DEPS , and LR_DSQEPS .

See also
urand/config.h
Parameters
valconfiguration parameter
Returns
double configuration value

Definition at line 483 of file urand.c.

◆ LR_drand()

double LR_drand ( LR_obj o)

LR_drand(LR_obj *) - returns double in range [0.0,1.0)

Returns a pseudo-random double in the range [0.0, 1.0)

Parameters
oLR_obj object
Returns
double range [0.0, 1.0)

Definition at line 342 of file urand.c.

◆ LR_fgetrand()

float LR_fgetrand ( LR_obj o)

LR_fgetrand(LR_obj *) - get the current pseudo-random number.

Get the current pseudo-random number from this LR_obj .

Parameters
oLR_obj object
Returns
float current pseudo-random number

Definition at line 256 of file urand.c.

◆ LR_fgetval()

float LR_fgetval ( char *  val)

LR_fgetval(char *val) - return the configure value.

Return the value computed from the library configuration step, such as LR_FEPS , and LR_FSQEPS .

See also
urand/config.h
Parameters
valconfiguration parameter
Returns
float configuration value

Definition at line 464 of file urand.c.

◆ LR_frand()

float LR_frand ( LR_obj o)

LR_frand(LR_obj *) - returns float in range [0.0,1.0)

Returns a pseudo-random float in the range [0.0, 1.0)

Parameters
oLR_obj object
Returns
float range [0.0, 1.0)

Definition at line 193 of file urand.c.

◆ LR_igetrand()

int LR_igetrand ( LR_obj o)

LR_igetrand(LR_obj *) - get the current pseudo-random number.

Get the current pseudo-random number from this LR_obj .

Parameters
oLR_obj object
Returns
int current pseudo-random number

Definition at line 243 of file urand.c.

◆ LR_igetseed()

int LR_igetseed ( LR_obj o)

LR_igetseed(LR_obj *) - get the current seed.

Get the seed from this LR_obj .

Parameters
oLR_obj object
Returns
int current object seed

Definition at line 230 of file urand.c.

◆ LR_igetval()

int LR_igetval ( char *  val)

LR_igetval(char *val) - return the configure value.

Return the value computed from the library configuration step, such as LR_IRAND_IMAX2 , LR_IRAND_IMAX , and LR_IRAND_INOT .

See also
urand/config.h
Parameters
valconfiguration parameter
Returns
int configuration value

Definition at line 422 of file urand.c.

◆ LR_irand()

int LR_irand ( LR_obj o)

LR_irand(LR_obj *) - returns int in range [0,LR_IRAND_IMAX].

Returns a pseudo-random int in the range [0,LR_IRAND_MAX]

Parameters
oLR_obj object
Returns
int range [0, LR_IRAND_IMAX]

Definition at line 121 of file urand.c.

◆ LR_isetseed()

void LR_isetseed ( LR_obj o,
int  X 
)

LR_isetseed(LR_obj *, int X) - set the seed to X.

Set the seed for this LR_obj .

Parameters
oLR_obj object
Xint with new seed
Returns
void

Definition at line 212 of file urand.c.

◆ LR_lgetrand()

long LR_lgetrand ( LR_obj o)

LR_lgetrand(LR_obj *) - get the current pseudo-random number.

Get the current pseudo-random number from this LR_obj .

Parameters
oLR_obj object
Returns
long current pseudo-random number

Definition at line 392 of file urand.c.

◆ LR_lgetseed()

long LR_lgetseed ( LR_obj o)

LR_lgetseed(LR_obj *) - get the current seed.

Get the seed from this LR_obj .

Parameters
oLR_obj object
Returns
long current object seed

Definition at line 379 of file urand.c.

◆ LR_lgetval()

long LR_lgetval ( char *  val)

LR_lgetval(char *val) - return the configure value.

Return the value computed from the library configuration step, such as LR_IRAND_LMAX2 , LR_IRAND_LMAX , and LR_IRAND_LNOT .

See also
urand/config.h
Parameters
valconfiguration parameter
Returns
long configuration value

Definition at line 443 of file urand.c.

◆ LR_lrand()

long LR_lrand ( LR_obj o)

LR_lrand(LR_obj *) - returns long in range [0,LR_IRAND_LMAX].

Returns a pseudo-random int in the range [0,LR_IRAND_LMAX]

Parameters
oLR_obj object
Returns
int range [0, LR_IRAND_LMAX]

Definition at line 270 of file urand.c.

◆ LR_lsetseed()

void LR_lsetseed ( LR_obj o,
long  X 
)

LR_lsetseed(LR_obj *, long X) - set the seed to X.

Set the seed for this LR_obj .

Parameters
oLR_obj object
Xlong with new seed
Returns
void

Definition at line 361 of file urand.c.

◆ LR_lspl_new()

int LR_lspl_new ( LR_obj o,
int  n 
)

LR_lspl_new(LR_obj *o, int n) - create a new linear spline object.

This routine must be called after the LR_obj object is created and it allocates memory for the number of expected segments.

Parameters
oLR_obj object
nlargest number of intervals
Returns
0 if successful, else non-zero if failed

Definition at line 88 of file LRlspline.c.

◆ LR_lspl_norm()

int LR_lspl_norm ( LR_obj o)

LR_lspl_norm(LR_obj *o) - normalize the interval scale factors.

The LR_lspl_norm() function is absolutely required to be called so the integrated probability density equals one. If this routine is not called subsequent calls to the CDF/PDF/RAN functions will raise an error (returning a NAN).

Parameters
oLR_obj object
Returns
0 if successful, else non-zero if failed

Definition at line 147 of file LRlspline.c.

◆ LR_lspl_rm()

int LR_lspl_rm ( LR_obj o)

LR_lspl_rm(LR_obj *o) - strip out the LR_lspl object part of LR_obj.

Removes the allocated memory for the segment pieces.

Parameters
oLR_obj object address
Returns
0 if successful, else non-zero if failed

Definition at line 100 of file LRlspline.c.

◆ LR_lspl_set()

int LR_lspl_set ( LR_obj o,
double  x,
double  p 
)

LR_lspl_set(LR_obj *o, double x) - add interval boundary (will order internally).

The LR_lspl_set function defines the set of segments for the probability density function. It adds a new boundary and the value of the probability density at that boundary.

Boundary values can be defined in any order and will be ordered internally by this method.

The outer boundaries are defined through the LR_set_all() function and the probability density is pinned to zero at these endpoints.

The set of segments and the probability density is relatively defined with LR_lspl_set(). Once all the segments are defined then the probability density must be normalized with LR_lspl_norm() such that the total integrated value is equal to one!

Parameters
oLR_obj object
xinterval boundary to add
prelative probablity for interval starting at x
Returns
0 if successful, else non-zero if failed

Definition at line 128 of file LRlspline.c.

◆ LR_new()

LR_obj* LR_new ( LR_type  t,
LR_data_type  d 
)

LR_new(LR_type t, LR_data_type d) - create the LR object and preset some default parameter values.

Parameters
tLR_type (e.g. LR_gausbm)
dLR_data_type (e.g. LR_double)
Returns
LR_obj *

Definition at line 60 of file LRnew.c.

◆ LR_pcs_new()

int LR_pcs_new ( LR_obj o,
int  n 
)

LR_pcs_new(LR_obj *o, int n) - create a new piecewise uniform object set of segments.

This routine must be called after the LR_obj object is created and it allocates memory for the number of expected segments.

Parameters
oLR_obj object
nlargest number of intervals
Returns
0 if successful, else non-zero if failed

Definition at line 78 of file LRpiece.c.

◆ LR_pcs_norm()

int LR_pcs_norm ( LR_obj o)

LR_pcs_norm(LR_obj *o) - normalize the interval scale factors.

The LR_pcs_norm() function is absolutely required to be called so the integrated probability density equals one. If this routine is not called subsequent calls to the CDF/PDF/RAN functions will raise an error (returning a NAN).

Parameters
oLR_obj object
Returns
0 if successful, else non-zero if failed

Definition at line 220 of file LRpiece.c.

◆ LR_pcs_rm()

int LR_pcs_rm ( LR_obj o)

LR_pcs_rm(LR_obj *o) - strip out the LR_pcs object part of LR_obj.

Removes the allocated memory for the segment pieces.

Parameters
oLR_obj object address
Returns
0 if successful, else non-zero if failed

Definition at line 122 of file LRpiece.c.

◆ LR_pcs_set()

int LR_pcs_set ( LR_obj o,
double  x,
double  p 
)

LR_pcs_set(LR_obj *o, double x) - add interval boundary (will order internally).

The LR_pcs_set function defines the set of segments for the probability density function. It adds a new boundary and the value of the probability density following that boundary.

Boundary values can be defined in any order and will be ordered internally by this method.

The first segment (and boundary) is defined through the LR_set_all() function, which also defines the last segment end point.

The set of segments and the probability density is relatively defined with LR_pcs_set(). Once all the segments are defined then the probability density must be normalized with LR_pcs_norm() such that the total integrated value is equal to one!

Parameters
oLR_obj object
xinterval boundary to add
prelative probablity for interval greater than x
Returns
0 if successful, else non-zero if failed

Definition at line 158 of file LRpiece.c.

◆ LR_rm()

int LR_rm ( LR_obj **  o)

LR_rm(LR_obj **o) - destroy the LR object and release allocated memory.

Parameters
oAddress of LR_obj pointer
Returns
0 if successful, non-zero if an error

Definition at line 432 of file LRnew.c.

◆ LR_set()

int LR_set ( LR_obj o,
char  x,
  ... 
)

LR_set(LR_obj *o, char x, ...) - set a single LR object parameter.

This routine is designed to set a single LR_obj attribute as directed by the format character. See LR_vset() for allowed list of format characters.

Parameters
oLR_obj object
xsingle character format
...optional argument
Returns
negative number of non-valid value in format string or error if > 0

Definition at line 165 of file LRset.c.

◆ LR_set_all()

int LR_set_all ( LR_obj o,
char *  x,
  ... 
)

LR_set_all(LR_obj *o, char *x, ...) - set all given LR object parameters.

Set a collection of LR_obj attributes. This routine has any number of arguments as defined by the format string (similar to printf() ).

See LR_vset() for list of allowed format string characters.

Parameters
oLR_obj object
xformat string
...optional arguments
Returns
negative number of non-valid values in format string or error if > 0

Definition at line 194 of file LRset.c.

◆ LR_vset()

int LR_vset ( LR_obj o,
char *  x,
va_list  ap 
)

LR_vset(LR_obj *o, char *x, va_list ap) - read and parse options.

This function is similar to vprintf() where the optional arguments are scanned according to format *x. The function accesses additional arguments by using the context information designated by ap. The program must execute va_start() before calling this function, and call va_end() afterward.

Generally there is no need to call this routine. Call LR_set_all() instead.

However, the list of attributes handled is important - 'k','n', 'p', 'q', 'd', 'a', 'b', 'm', 's', and 'x'. Any other characters are ignored except causing a negative value to be returned representing the number of such ignored characters. A real error will result in a positive return value.

All other characters in the format string are an ignorable error.

The precision of the input values are governed by the LR_obj LR_data_type, except for 'k','n' which are int only, and except for 'p','q' which are float only.

Parameters
oLR_obj object
xcontrolling format string
apadditional arguments context information
Returns
0 if no error else < 0 for non-valid characters in format string or an error if > 0

Definition at line 75 of file LRset.c.

◆ LRd_cauchy_CDF()

double LRd_cauchy_CDF ( LR_obj o,
double  x 
)

LRd_cauchy_CDF(LR_obj *o, double x) - double Cauchy/Lorentz cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 117 of file LRcauchy.c.

◆ LRd_cauchy_PDF()

double LRd_cauchy_PDF ( LR_obj o,
double  x 
)

LRd_cauchy_PDF(LR_obj *o, double x) - double Cauchy/Lorentz probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 103 of file LRcauchy.c.

◆ LRd_cauchy_RAN()

double LRd_cauchy_RAN ( LR_obj o)

LRd_cauchy_RAN(LR_obj *o) - double random Cauchy/Lorentz distribution using the inversion method on the CDF(x). Default values: peak m = 0, half width s = 1.

Parameters
oLR_obj object
Returns
double

Definition at line 71 of file LRcauchy.c.

◆ LRd_cauchymar_RAN()

double LRd_cauchymar_RAN ( LR_obj o)

LRd_cauchymar_RAN(LR_obj *o) - double random Cauchy/Lorentz distribution using the polar method and the Marsagalia method and acceptance/rejection for generating a Gaussian/Normal variate. Default values: peak m = 0, half width s = 1.

Parameters
oLR_obj object
Returns
double

Definition at line 84 of file LRcauchy.c.

◆ LRd_CDF()

double LRd_CDF ( LR_obj o,
double  x 
)

LRd_CDF(LR_obj *o, double x) - cumulative distribution function.

This method will call the specific random variate cumulative distribution function as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 101 of file LRdf.c.

◆ LRd_erlang_CDF()

double LRd_erlang_CDF ( LR_obj o,
double  x 
)

LRd_erlang_CDF(LR_obj *o, double x) - Erlang distribution cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 118 of file LRerlang.c.

◆ LRd_erlang_PDF()

double LRd_erlang_PDF ( LR_obj o,
double  x 
)

LRd_erlang_PDF(LR_obj *o, double x) - Erlang distribution probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 87 of file LRerlang.c.

◆ LRd_erlang_RAN()

double LRd_erlang_RAN ( LR_obj o)

LRd_erlang_RAN(LR_obj *o) - double random negative exponential distribution using the inversion method. Default values: scale m = 1.

Parameters
oLR_obj object
Returns
double

Definition at line 66 of file LRerlang.c.

◆ LRd_gaus_CDF()

double LRd_gaus_CDF ( LR_obj o,
double  x 
)

LRd_gaus_CDF(LR_obj *o, double x) - double Gaussian/Normal cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 146 of file LRgaus.c.

◆ LRd_gaus_PDF()

double LRd_gaus_PDF ( LR_obj o,
double  x 
)

LRd_gaus_PDF(LR_obj *o, double x) - double Gaussian/Normal probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 129 of file LRgaus.c.

◆ LRd_gausbm_RAN()

double LRd_gausbm_RAN ( LR_obj o)

LRd_gausbm_RAN(LR_obj *o) - double random Gaussian/Normal distribution using the Box-Muller method.

Default values: mean m = 0, std.deviation s = 1

Parameters
oLR_obj object
Returns
double

Definition at line 72 of file LRgaus.c.

◆ LRd_gausmar_RAN()

double LRd_gausmar_RAN ( LR_obj o)

LRd_gausmar_RAN(LR_obj *o) - double random Gaussian/Normal distribution using the Marsaglia method with acceptance-rejection.

Default values: mean m = 0, std.deviation s = 1

Parameters
oLR_obj object
Returns
double

Definition at line 101 of file LRgaus.c.

◆ LRd_gsn12_CDF()

double LRd_gsn12_CDF ( LR_obj o,
double  x 
)

LRd_gsn12_CDF(LR_obj *o, double x) - double gaussian-like (simple bell curve) cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 688 of file LRgsn.c.

◆ LRd_gsn12_PDF()

double LRd_gsn12_PDF ( LR_obj o,
double  x 
)

LRd_gsn12_PDF(LR_obj *o, double x) - double gaussian-like (simple bell curve) probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 659 of file LRgsn.c.

◆ LRd_gsn12_RAN()

double LRd_gsn12_RAN ( LR_obj o)

LRd_gsn12_RAN(LR_obj *o) - double random g12 gaussian-like distribution closely matches a Gaussian/Normal distribution using the sum of 12 uniform random variates.

Default: mean m = 0, std.deviation s = 1

Parameters
oLR_obj object
Returns
double

Definition at line 639 of file LRgsn.c.

◆ LRd_gsn2_CDF()

double LRd_gsn2_CDF ( LR_obj o,
double  x 
)

LRd_gsn2_CDF(LR_obj *o, double x) - double gaussian-like (saw tooth) cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 206 of file LRgsn.c.

◆ LRd_gsn2_PDF()

double LRd_gsn2_PDF ( LR_obj o,
double  x 
)

LRd_gsn2_PDF(LR_obj *o, double x) - double gaussian-like (saw tooth) probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 183 of file LRgsn.c.

◆ LRd_gsn2_RAN()

double LRd_gsn2_RAN ( LR_obj o)

LRd_gsn2_RAN(LR_obj *o) - double random g2 gaussian-like (saw tooth) distribution.

Default range: [a,b) = [-1,1)

Parameters
oLR_obj object
Returns
double

Definition at line 169 of file LRgsn.c.

◆ LRd_gsn4_CDF()

double LRd_gsn4_CDF ( LR_obj o,
double  x 
)

LRd_gsn4_CDF(LR_obj *o, double x) - double gaussian-like (saw tooth) cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 418 of file LRgsn.c.

◆ LRd_gsn4_PDF()

double LRd_gsn4_PDF ( LR_obj o,
double  x 
)

LRd_gsn4_PDF(LR_obj *o, double x) - double gaussian-like (simple bell curve) probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 388 of file LRgsn.c.

◆ LRd_gsn4_RAN()

double LRd_gsn4_RAN ( LR_obj o)

LRd_gsn4_RAN(LR_obj *o) - double random g4 gaussian-like (simple bell curve) distribution.

Default range: [a,b) = [-2,2)

Parameters
oLR_obj object
Returns
double

Definition at line 373 of file LRgsn.c.

◆ LRd_lspline_CDF()

double LRd_lspline_CDF ( LR_obj o,
double  x 
)

LRd_lspline_CDF(LR_obj *o, double x) - double linear spline cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 281 of file LRlspline.c.

◆ LRd_lspline_PDF()

double LRd_lspline_PDF ( LR_obj o,
double  x 
)

LRd_lspline_PDF(LR_obj *o, double x) - double linear spline probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 247 of file LRlspline.c.

◆ LRd_lspline_RAN()

double LRd_lspline_RAN ( LR_obj o)

LRd_lspline_RAN(LR_obj *o) - double random linear spline distribution random variate.

Parameters
oLR_obj object
Returns
double if OK else NaN

Definition at line 209 of file LRlspline.c.

◆ LRd_nexp_CDF()

double LRd_nexp_CDF ( LR_obj o,
double  x 
)

LRd_nexp_CDF(LR_obj *o, double x) - double negative exponential cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 93 of file LRnexp.c.

◆ LRd_nexp_PDF()

double LRd_nexp_PDF ( LR_obj o,
double  x 
)

LRd_nexp_PDF(LR_obj *o, double x) - double negative exponential probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 75 of file LRnexp.c.

◆ LRd_nexp_RAN()

double LRd_nexp_RAN ( LR_obj o)

LRd_nexp_RAN(LR_obj *o) - double random negative exponential distribution using the inversion method. Default values: peak m = 1.

Parameters
oLR_obj object
Returns
double

Definition at line 57 of file LRnexp.c.

◆ LRd_PDF()

double LRd_PDF ( LR_obj o,
double  x 
)

LRd_PDF(LR_obj *o, double x) - probability distribution function.

This method will call the specific random variate probability distribution function as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 80 of file LRdf.c.

◆ LRd_piece_CDF()

double LRd_piece_CDF ( LR_obj o,
double  x 
)

LRd_piece_CDF(LR_obj *o, double x) - double piecewise uniform cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x, else a NAN if an error

Definition at line 332 of file LRpiece.c.

◆ LRd_piece_PDF()

double LRd_piece_PDF ( LR_obj o,
double  x 
)

LRd_piece_PDF(LR_obj *o, double x) - double piecewise uniform probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x, else a NAN if an error

Definition at line 305 of file LRpiece.c.

◆ LRd_piece_RAN()

double LRd_piece_RAN ( LR_obj o)

LRd_piece_RAN(LR_obj *o) - double random piecewise uniform distribution random variate.

Parameters
oLR_obj object
Returns
double if OK, else NaN

Definition at line 277 of file LRpiece.c.

◆ LRd_RAN()

double LRd_RAN ( LR_obj o)

LRd_RAN(LR_obj *o) - random variate generator.

This method will call the specific random variate generator as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
Returns
double random variate

Definition at line 59 of file LRdf.c.

◆ LRd_uinvcdf()

int LRd_uinvcdf ( LR_obj o,
double(*)(double)  cdf 
)

LRd_uinvcdf() - set the user defined CDF for this variate distribution.

Parameters
oLR_obj object
cdfUser defined CDF
Returns
0 if no error, non-zero otherwise

Definition at line 131 of file LRuinvcdf.c.

◆ LRd_uinvcdf_CDF()

double LRd_uinvcdf_CDF ( LR_obj o,
double  x 
)

LRd_uinvcdf_CDF(LR_obj *o, double x) - double User supplied cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 384 of file LRuinvcdf.c.

◆ LRd_uinvcdf_PDF()

double LRd_uinvcdf_PDF ( LR_obj o,
double  x 
)

LRd_uinvcdf_PDF(LR_obj *o, double x) - double probability distribution function approximated from the user supplied cumulative distribution function.

Use the definition of a derivative to approximate the PDF from the given CDF.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 329 of file LRuinvcdf.c.

◆ LRd_uinvcdf_RAN()

double LRd_uinvcdf_RAN ( LR_obj o)

LRd_uinvcdf_RAN(LR_obj *o) - double random variate via inverse method of the UserCDF() fn.

Parameters
oLR_obj object
Returns
double

Definition at line 269 of file LRuinvcdf.c.

◆ LRd_unif_CDF()

double LRd_unif_CDF ( LR_obj o,
double  x 
)

LRd_unif_CDF(LR_obj *o, double x) - double uniform cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
double CDF at x

Definition at line 86 of file LRunif.c.

◆ LRd_unif_PDF()

double LRd_unif_PDF ( LR_obj o,
double  x 
)

LRd_unif_PDF(LR_obj *o, double x) - double uniform probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
double PDF at x

Definition at line 69 of file LRunif.c.

◆ LRd_unif_RAN()

double LRd_unif_RAN ( LR_obj o)

LRd_unif_RAN(LR_obj *o) - double random uniform distribution.

Parameters
oLR_obj object
Returns
double

Definition at line 55 of file LRunif.c.

◆ LRf_cauchy_CDF()

float LRf_cauchy_CDF ( LR_obj o,
float  x 
)

LRf_cauchy_CDF(LR_obj *o, float x) - float Cauchy/Lorentz cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 180 of file LRcauchy.c.

◆ LRf_cauchy_PDF()

float LRf_cauchy_PDF ( LR_obj o,
float  x 
)

LRf_cauchy_PDF(LR_obj *o, float x) - float Cauchy/Lorentz probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 166 of file LRcauchy.c.

◆ LRf_cauchy_RAN()

float LRf_cauchy_RAN ( LR_obj o)

LRf_cauchy_RAN(LR_obj *o) - float random Cauchy/Lorentz distribution using the inversion method. Default values: peak m = 0, half width s = 1.

Parameters
oLR_obj object
Returns
float

Definition at line 134 of file LRcauchy.c.

◆ LRf_cauchymar_RAN()

float LRf_cauchymar_RAN ( LR_obj o)

LRf_cauchymar_RAN(LR_obj *o) - float random Cauchy/Lorentz distribution using the polar method and the Marsagalia method and acceptance/rejection for generating a Gaussian/Normal variate. Default values: peak m = 0, half width s = 1.

Parameters
oLR_obj object
Returns
float

Definition at line 147 of file LRcauchy.c.

◆ LRf_CDF()

float LRf_CDF ( LR_obj o,
float  x 
)

LRf_CDF(LR_obj *o, float x) - cumulative distribution function.

This method will call the specific random variate cumulative distribution function as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 161 of file LRdf.c.

◆ LRf_erlang_CDF()

float LRf_erlang_CDF ( LR_obj o,
float  x 
)

LRf_erlang_CDF(LR_obj *o, float x) - Erlang distribution cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 194 of file LRerlang.c.

◆ LRf_erlang_PDF()

float LRf_erlang_PDF ( LR_obj o,
float  x 
)

LRf_erlang_PDF(LR_obj *o, float x) - Erlang distribution probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 163 of file LRerlang.c.

◆ LRf_erlang_RAN()

float LRf_erlang_RAN ( LR_obj o)

LRf_erlang_RAN(LR_obj *o) - float random negative exponential distribution using the inversion method. Default values: scale m = 1.

Parameters
oLR_obj object
Returns
float

Definition at line 142 of file LRerlang.c.

◆ LRf_gaus_CDF()

float LRf_gaus_CDF ( LR_obj o,
float  x 
)

LRf_gaus_CDF(LR_obj *o, float x) - float Gaussian/Normal cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 238 of file LRgaus.c.

◆ LRf_gaus_PDF()

float LRf_gaus_PDF ( LR_obj o,
float  x 
)

LRf_gaus_PDF(LR_obj *o, float x) - float Gaussian/Normal probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 221 of file LRgaus.c.

◆ LRf_gausbm_RAN()

float LRf_gausbm_RAN ( LR_obj o)

LRf_gausbm_RAN(LR_obj *o) - float random Gaussian/Normal distribution using the Box-Muller method.

Default values: mean m = 0, std.deviation s = 1

Parameters
oLR_obj object
Returns
float

Definition at line 165 of file LRgaus.c.

◆ LRf_gausmar_RAN()

float LRf_gausmar_RAN ( LR_obj o)

LRf_gausmar_RAN(LR_obj *o) - float random Gaussian/Normal distribution using the Marsaglia method with acceptance-rejection.

Default values: mean m = 0, std.deviation s = 1

Parameters
oLR_obj object
Returns
float

Definition at line 193 of file LRgaus.c.

◆ LRf_gsn12_CDF()

float LRf_gsn12_CDF ( LR_obj o,
float  x 
)

LRf_gsn12_CDF(LR_obj *o, float x) - float gaussian-like (simple bell curve) cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 770 of file LRgsn.c.

◆ LRf_gsn12_PDF()

float LRf_gsn12_PDF ( LR_obj o,
float  x 
)

LRf_gsn12_PDF(LR_obj *o, float x) - float gaussian-like (simple bell curve) probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 741 of file LRgsn.c.

◆ LRf_gsn12_RAN()

float LRf_gsn12_RAN ( LR_obj o)

LRf_gsn12_RAN(LR_obj *o) - float random g12 gaussian-like distribution closely matches a Gaussian/Normal distribution using the sum of 12 uniform random variates.

Default: mean m = 0, std.deviation s = 1

Parameters
oLR_obj object
Returns
float

Definition at line 721 of file LRgsn.c.

◆ LRf_gsn2_CDF()

float LRf_gsn2_CDF ( LR_obj o,
float  x 
)

LRf_gsn2_CDF(LR_obj *o, float x) - float gaussian-like (saw tooth) cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 271 of file LRgsn.c.

◆ LRf_gsn2_PDF()

float LRf_gsn2_PDF ( LR_obj o,
float  x 
)

LRf_gsn2_PDF(LR_obj *o, float x) - float gaussian-like (saw tooth) probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 248 of file LRgsn.c.

◆ LRf_gsn2_RAN()

float LRf_gsn2_RAN ( LR_obj o)

LRf_gsn2_RAN(LR_obj *o) - float random g2 gaussian-like (saw tooth) distribution.

Default range: [a,b) = [-1,1)

Parameters
oLR_obj object
Returns
float

Definition at line 234 of file LRgsn.c.

◆ LRf_gsn4_CDF()

float LRf_gsn4_CDF ( LR_obj o,
float  x 
)

LRf_gsn4_CDF(LR_obj *o, float x) - float gaussian-like (saw tooth) cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 496 of file LRgsn.c.

◆ LRf_gsn4_PDF()

float LRf_gsn4_PDF ( LR_obj o,
float  x 
)

LRf_gsn4_PDF(LR_obj *o, float x) - float gaussian-like (simple bell curve) probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 466 of file LRgsn.c.

◆ LRf_gsn4_RAN()

float LRf_gsn4_RAN ( LR_obj o)

LRf_gsn4_RAN(LR_obj *o) - float random g4 gaussian-like (simple bell curve) distribution.

Default range: [a,b) = [-2,2)

Parameters
oLR_obj object
Returns
float

Definition at line 451 of file LRgsn.c.

◆ LRf_lspline_CDF()

float LRf_lspline_CDF ( LR_obj o,
float  x 
)

LRf_lspline_CDF(LR_obj *o, float x) - float linear spline cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 390 of file LRlspline.c.

◆ LRf_lspline_PDF()

float LRf_lspline_PDF ( LR_obj o,
float  x 
)

LRf_lspline_PDF(LR_obj *o, float x) - float linear spline probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 356 of file LRlspline.c.

◆ LRf_lspline_RAN()

float LRf_lspline_RAN ( LR_obj o)

LRf_lspline_RAN(LR_obj *o) - float random linear spline distribution.

Parameters
oLR_obj object
Returns
float if OK else NaN

Definition at line 318 of file LRlspline.c.

◆ LRf_nexp_CDF()

float LRf_nexp_CDF ( LR_obj o,
float  x 
)

LRf_nexp_CDF(LR_obj *o, float x) - float negative exponential cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 148 of file LRnexp.c.

◆ LRf_nexp_PDF()

float LRf_nexp_PDF ( LR_obj o,
float  x 
)

LRf_nexp_PDF(LR_obj *o, float x) - float negative exponential probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 130 of file LRnexp.c.

◆ LRf_nexp_RAN()

float LRf_nexp_RAN ( LR_obj o)

LRf_nexp_RAN(LR_obj *o) - float random negative exponential distribution using the inversion method. Default values: peak m = 1.

Parameters
oLR_obj object
Returns
float

Definition at line 112 of file LRnexp.c.

◆ LRf_PDF()

float LRf_PDF ( LR_obj o,
float  x 
)

LRf_PDF(LR_obj *o, float x) - probability distribution function.

This method will call the specific random variate probability distribution function as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 140 of file LRdf.c.

◆ LRf_piece_CDF()

float LRf_piece_CDF ( LR_obj o,
float  x 
)

LRf_piece_CDF(LR_obj *o, float x) - float piecewise uniform cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x, else a NAN if an error

Definition at line 415 of file LRpiece.c.

◆ LRf_piece_PDF()

float LRf_piece_PDF ( LR_obj o,
float  x 
)

LRf_piece_PDF(LR_obj *o, float x) - float piecewise uniform probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x, else a NAN if an error

Definition at line 388 of file LRpiece.c.

◆ LRf_piece_RAN()

float LRf_piece_RAN ( LR_obj o)

LRf_piece_RAN(LR_obj *o) - float random piecewise uniform distribution.

Parameters
oLR_obj object
Returns
float if OK, else NaN

Definition at line 360 of file LRpiece.c.

◆ LRf_RAN()

float LRf_RAN ( LR_obj o)

LRf_RAN(LR_obj *o) - random variate generator.

This method will call the specific random variate generator as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
Returns
float random variate

Definition at line 119 of file LRdf.c.

◆ LRf_uinvcdf()

int LRf_uinvcdf ( LR_obj o,
float(*)(float)  cdf 
)

LRf_uinvcdf() - set the user defined CDF for this variate distribution.

Parameters
oLR_obj object
cdfUser defined CDF
Returns
0 if no error, non-zero otherwise

Definition at line 413 of file LRuinvcdf.c.

◆ LRf_uinvcdf_CDF()

float LRf_uinvcdf_CDF ( LR_obj o,
float  x 
)

LRf_uinvcdf_CDF(LR_obj *o, float x) - float User supplied cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 666 of file LRuinvcdf.c.

◆ LRf_uinvcdf_PDF()

float LRf_uinvcdf_PDF ( LR_obj o,
float  x 
)

LRf_uinvcdf_PDF(LR_obj *o, float x) - float probability distribution function approximated from the user supplied cumulative distribution function.

Use the definition of a derivative to approximate the PDF from the given CDF.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 611 of file LRuinvcdf.c.

◆ LRf_uinvcdf_RAN()

float LRf_uinvcdf_RAN ( LR_obj o)

LRf_uinvcdf_RAN(LR_obj *o) - float random variate via inverse method of the UserCDF() fn.

Parameters
oLR_obj object
Returns
float

Definition at line 551 of file LRuinvcdf.c.

◆ LRf_unif_CDF()

float LRf_unif_CDF ( LR_obj o,
float  x 
)

LRf_unif_CDF(LR_obj *o, float x) - float uniform cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 135 of file LRunif.c.

◆ LRf_unif_PDF()

float LRf_unif_PDF ( LR_obj o,
float  x 
)

LRf_unif_PDF(LR_obj *o, float x) - float uniform probablity distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 118 of file LRunif.c.

◆ LRf_unif_RAN()

float LRf_unif_RAN ( LR_obj o)

LRf_unif_RAN(LR_obj *o) - float random uniform distribution.

Parameters
oLR_obj object
Returns
float

Definition at line 104 of file LRunif.c.

◆ LRi_binomial_CDF()

float LRi_binomial_CDF ( LR_obj o,
int  k 
)

LRi_binomial_CDF(LR_obj *o, int k) - Binomial distribution cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 133 of file LRbinom.c.

◆ LRi_binomial_PDF()

float LRi_binomial_PDF ( LR_obj o,
int  k 
)

LRi_binomial_PDF(LR_obj *o, int k) - Binomial probablity (or mass) distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 108 of file LRbinom.c.

◆ LRi_binomial_RAN()

int LRi_binomial_RAN ( LR_obj o)

LRi_binomial_RAN(LR_obj *o) - int Binomial distributed variate. Default values: probability of success p = 1/2.

The random variate is generated using the waiting time property - Generate a number of exponential variates until the waited sum exceeds some value.

Parameters
oLR_obj object
Returns
int

Definition at line 82 of file LRbinom.c.

◆ LRi_CDF()

float LRi_CDF ( LR_obj o,
int  x 
)

LRi_CDF(LR_obj *o, int x) - cumulative distribution function.

This method will call the specific random variate cumulative distribution function as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 221 of file LRdf.c.

◆ LRi_geometric_CDF()

float LRi_geometric_CDF ( LR_obj o,
int  x 
)

LRi_geometric_CDF(LR_obj *o, int x) - Geometric distribution cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 112 of file LRgeom.c.

◆ LRi_geometric_PDF()

float LRi_geometric_PDF ( LR_obj o,
int  x 
)

LRi_geometric_PDF(LR_obj *o, int x) - Geometric probablity (or mass) distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 88 of file LRgeom.c.

◆ LRi_geometric_RAN()

int LRi_geometric_RAN ( LR_obj o)

LRi_geometric_RAN(LR_obj *o) - int Geometric distributed variate. Default values: probability of success p = 1/2.

The random variate is generated using inversion and truncation.

Parameters
oLR_obj object
Returns
int

Definition at line 68 of file LRgeom.c.

◆ LRi_PDF()

float LRi_PDF ( LR_obj o,
int  x 
)

LRi_PDF(LR_obj *o, int x) - probability distribution function.

This method will call the specific random variate probability distribution function as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 200 of file LRdf.c.

◆ LRi_poisson_CDF()

float LRi_poisson_CDF ( LR_obj o,
int  x 
)

LRi_poisson_CDF(LR_obj *o, int x) - Poisson distribution cumulative distribution function.

Parameters
oLR_obj object
xvalue
Returns
float CDF at x

Definition at line 116 of file LRpoisson.c.

◆ LRi_poisson_PDF()

float LRi_poisson_PDF ( LR_obj o,
int  x 
)

LRi_poisson_PDF(LR_obj *o, int x) - Poisson probablity (or mass) distribution function.

Parameters
oLR_obj object
xvalue
Returns
float PDF at x

Definition at line 91 of file LRpoisson.c.

◆ LRi_poisson_RAN()

int LRi_poisson_RAN ( LR_obj o)

LRi_poisson_RAN(LR_obj *o) - int Poisson distributed variate. Default values: scale m = 1.

Parameters
oLR_obj object
Returns
int

Definition at line 66 of file LRpoisson.c.

◆ LRi_RAN()

int LRi_RAN ( LR_obj o)

LRi_RAN(LR_obj *o) - random variate generator.

This method will call the specific random variate generator as determined by the object's LR_type and LR_data_type. Note that using the wrong data type will return a NAN and raise an error.

Parameters
oLR_obj object
Returns
int random variate

Definition at line 179 of file LRdf.c.

◆ LRperror()

void LRperror ( char *  str,
int  LRerrno 
)

LRperror(char *str, int LRerrno) - print out explanatory error message to stderr.

If the char str string is not NULL then prepend this string to the LibRan error message with a " : " delimiter and sent to stderr .

Parameters
strString to prepend to error message
LRerrnoLibRan error number
Returns
void - but outputs an error message to stderr

Definition at line 157 of file LRerror.c.

◆ LRstrerrno()

char* LRstrerrno ( int  LRerrno)

LRstrerrno(int LRerrno) - return the errno code string for the given LibRan errno.

Parameters
LRerrnoLibRan error number
Returns
char * pointer to static constant string.

Definition at line 112 of file LRerror.c.

◆ LRstrerror()

char* LRstrerror ( int  LRerrno)

LRstrerror(int LRerrno) - return some explanatory text regarding the given LibRan errno.

Parameters
LRerrnoLibRan error number
Returns
char * pointer to static constant string.

Definition at line 71 of file LRerror.c.