20 # define LR_VER_MAJOR 0 21 # define LR_VER_MINOR 5 22 # define LR_VER_PATCH 1 23 # define LR_VERSION LR_VER_MAJOR.LR_VER_MINOR.LR_VER_PATCH 27 # define LR_DATE 20191201 32 # define LRerr_OK 0x00 33 # define LRerr_Unspecified 0x01 34 # define LRerr_BadDataType 0x03 35 # define LRerr_BadLRType 0x05 36 # define LRerr_NoAuxiliaryObject 0x09 37 # define LRerr_NoAuxNormalizeDone 0x0B 38 # define LRerr_BadAuxSetup 0x0D 39 # define LRerr_BinGeneric 0x11 40 # define LRerr_TooManyValues 0x13 41 # define LRerr_InvalidInputValue 0x15 42 # define LRerr_InvalidRange 0x17 43 # define LRerr_UnmetPreconditions 0x19 44 # define LRerr_SuspiciousValues 0x1B 45 # define LRerr_AllocFail 0x1D 46 # define LRerr_InvalidCDF 0x21 223 # define LR_AUX_NORM 0x01 224 # define LR_AUX_SET 0x02 239 double (*dcdf)(
double x);
240 float (*fcdf)(
float x);
262 void LRperror(
char *str,
int LRerrno);
263 char *LRversion(
char *str);
404 double LRd_xgsn12_PDF(
LR_obj *o,
double x);
405 double LRd_xgsn12_CDF(
LR_obj *o,
double x);
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...
LR_data_type
an enum of allowed value types
double LRd_nexp_RAN(LR_obj *o)
LRd_nexp_RAN(LR_obj *o) - double random negative exponential distribution using the inversion method...
int LR_aux_norm(LR_obj *o)
LR_aux_norm(LR_obj *o) - process given intervals and normalize values.
double LRd_unif_RAN(LR_obj *o)
LRd_unif_RAN(LR_obj *o) - double random uniform distribution.
int LR_set(LR_obj *o, char x,...)
LR_set(LR_obj *o, char x, ...) - set a single LR object parameter.
float(* cdff)(LR_obj *, float)
double LRd_unif_PDF(LR_obj *o, double x)
LRd_unif_PDF(LR_obj *o, double x) - double uniform probablity distribution function.
float LR_fgetval(char *str)
LR_fgetval(char *val) - return the configure value.
double LRd_nexp_PDF(LR_obj *o, double x)
LRd_nexp_PDF(LR_obj *o, double x) - double negative exponential probablity distribution function...
LR_bin * LR_bin_new(int n)
LR_bin_new(LR_data_type d, int n) - create new binning object.
float(* pdff)(LR_obj *, float)
float LRi_CDF(LR_obj *o, int x)
LRi_CDF(LR_obj *o, int x) - cumulative distribution function.
int LR_igetrand(LR_obj *)
LR_igetrand(LR_obj *) - get the current pseudo-random number.
long LR_lgetval(char *str)
LR_lgetval(char *val) - return the configure value.
float LRf_cauchymar_RAN(LR_obj *o)
LRf_cauchymar_RAN(LR_obj *o) - float random Cauchy/Lorentz distribution using the polar method and th...
double LR_drand(LR_obj *)
LR_drand(LR_obj *) - returns double in range [0.0,1.0)
int LR_aux_rm(LR_obj *o)
LR_aux_rm(LR_obj *o) - remove the auxiliary object.
int LRi_RAN(LR_obj *o)
LRi_RAN(LR_obj *o) - random variate generator.
float LRf_lspline_CDF(LR_obj *o, float x)
LRf_lspline_CDF(LR_obj *o, float x) - float linear spline cumulative distribution function...
float LRi_poisson_CDF(LR_obj *o, int x)
LRi_poisson_CDF(LR_obj *o, int x) - Poisson distribution cumulative distribution function.
spans the set of allowed value types
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...
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...
float LRf_erlang_PDF(LR_obj *o, float x)
LRf_erlang_PDF(LR_obj *o, float x) - Erlang distribution probablity distribution function.
double LRd_piece_PDF(LR_obj *o, double x)
LRd_piece_PDF(LR_obj *o, double x) - double piecewise uniform probablity distribution function...
double LRd_erlang_CDF(LR_obj *o, double x)
LRd_erlang_CDF(LR_obj *o, double x) - Erlang distribution cumulative distribution function...
double LR_dgetval(char *str)
LR_dgetval(char *val) - return the configure value.
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...
int LR_pcs_norm(LR_obj *o)
LR_pcs_norm(LR_obj *o) - normalize the interval scale factors.
int LRi_binomial_RAN(LR_obj *o)
LRi_binomial_RAN(LR_obj *o) - int Binomial distributed variate. Default values: probability of succes...
double LRd_gsn4_RAN(LR_obj *o)
LRd_gsn4_RAN(LR_obj *o) - double random g4 gaussian-like (simple bell curve) distribution.
double LRd_CDF(LR_obj *o, double x)
LRd_CDF(LR_obj *o, double x) - cumulative distribution function.
float LRf_piece_RAN(LR_obj *o)
LRf_piece_RAN(LR_obj *o) - float random piecewise uniform distribution.
LR_type
an enum of allowed random variate distribution types
int LRi_poisson_RAN(LR_obj *o)
LRi_poisson_RAN(LR_obj *o) - int Poisson distributed variate. Default values: scale m = 1...
int LR_irand(LR_obj *)
LR_irand(LR_obj *) - returns int in range [0,LR_IRAND_IMAX].
int LRd_uinvcdf(LR_obj *o, double(*cdf)(double))
LRd_uinvcdf() - set the user defined CDF for this variate distribution.
int LRf_uinvcdf(LR_obj *o, float(*cdf)(float))
LRf_uinvcdf() - set the user defined CDF for this variate distribution.
int LR_check(LR_obj *o)
LR_check(LR_obj *o) - check and fix the LR object parameters if possible.
float LRf_gausmar_RAN(LR_obj *o)
LRf_gausmar_RAN(LR_obj *o) - float random Gaussian/Normal distribution using the Marsaglia method wit...
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).
float LRf_cauchy_CDF(LR_obj *o, float x)
LRf_cauchy_CDF(LR_obj *o, float x) - float Cauchy/Lorentz cumulative distribution function...
float LRf_RAN(LR_obj *o)
LRf_RAN(LR_obj *o) - random variate generator.
float LR_fgetrand(LR_obj *)
LR_fgetrand(LR_obj *) - get the current pseudo-random number.
float LRf_lspline_PDF(LR_obj *o, float x)
LRf_lspline_PDF(LR_obj *o, float x) - float linear spline probablity distribution function...
A special object for defining some of the random variate distributions.
int LR_igetval(char *str)
LR_igetval(char *val) - return the configure value.
float LRf_PDF(LR_obj *o, float x)
LRf_PDF(LR_obj *o, float x) - probability distribution function.
double LRd_lspline_CDF(LR_obj *o, double x)
LRd_lspline_CDF(LR_obj *o, double x) - double linear spline cumulative distribution function...
float LRf_nexp_CDF(LR_obj *o, float x)
LRf_nexp_CDF(LR_obj *o, float x) - float negative exponential cumulative distribution function...
float LRf_unif_CDF(LR_obj *o, float x)
LRf_unif_CDF(LR_obj *o, float x) - float uniform cumulative distribution function.
double LRd_gausbm_RAN(LR_obj *o)
LRd_gausbm_RAN(LR_obj *o) - double random Gaussian/Normal distribution using the Box-Muller method...
float LRf_unif_RAN(LR_obj *o)
LRf_unif_RAN(LR_obj *o) - float random uniform distribution.
long LR_lrand(LR_obj *)
LR_lrand(LR_obj *) - returns long in range [0,LR_IRAND_LMAX].
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...
float LRi_geometric_PDF(LR_obj *o, int x)
LRi_geometric_PDF(LR_obj *o, int x) - Geometric probablity (or mass) distribution function...
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...
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...
float LRf_gaus_PDF(LR_obj *o, float x)
LRf_gaus_PDF(LR_obj *o, float x) - float Gaussian/Normal probablity distribution function.
double(* cdfd)(LR_obj *, double)
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...
long LR_lgetrand(LR_obj *)
LR_lgetrand(LR_obj *) - get the current pseudo-random number.
double LRd_RAN(LR_obj *o)
LRd_RAN(LR_obj *o) - random variate generator.
double LRd_PDF(LR_obj *o, double x)
LRd_PDF(LR_obj *o, double x) - probability distribution function.
int LR_igetseed(LR_obj *)
LR_igetseed(LR_obj *) - get the current seed.
float LRf_CDF(LR_obj *o, float x)
LRf_CDF(LR_obj *o, float x) - cumulative distribution function.
double LR_dgetrand(LR_obj *)
LR_dgetrand(LR_obj *) - get the current pseudo-random number.
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 f...
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.
the binning object - for tallying results
int LRi_geometric_RAN(LR_obj *o)
LRi_geometric_RAN(LR_obj *o) - int Geometric distributed variate. Default values: probability of succ...
float LRf_uinvcdf_CDF(LR_obj *o, float x)
LRf_uinvcdf_CDF(LR_obj *o, float x) - float User supplied cumulative distribution function...
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 f...
float LRf_lspline_RAN(LR_obj *o)
LRf_lspline_RAN(LR_obj *o) - float random linear spline distribution.
float LRf_cauchy_PDF(LR_obj *o, float x)
LRf_cauchy_PDF(LR_obj *o, float x) - float Cauchy/Lorentz probablity distribution function...
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...
double LRd_cauchy_CDF(LR_obj *o, double x)
LRd_cauchy_CDF(LR_obj *o, double x) - double Cauchy/Lorentz cumulative distribution function...
float LR_frand(LR_obj *)
LR_frand(LR_obj *) - returns float in range [0.0,1.0)
float LRf_uinvcdf_PDF(LR_obj *o, float x)
LRf_uinvcdf_PDF(LR_obj *o, float x) - float probability distribution function approximated from the u...
double LRd_gsn2_RAN(LR_obj *o)
LRd_gsn2_RAN(LR_obj *o) - double random g2 gaussian-like (saw tooth) distribution.
int LR_aux_new(LR_obj *o, int n)
LR_aux_new(LR_obj *o, int n) - initialize a new auxiliary object.
int LR_pcs_rm(LR_obj *o)
LR_pcs_rm(LR_obj *o) - strip out the LR_pcs object part of LR_obj.
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 ...
float LRf_gsn12_RAN(LR_obj *o)
LRf_gsn12_RAN(LR_obj *o) - float random g12 gaussian-like distribution closely matches a Gaussian/Nor...
int LR_bin_set(LR_bin *b, double x)
LR_bin_set(LR_bin *b, double x) - add bin boundary.
double LRd_gsn12_RAN(LR_obj *o)
LRd_gsn12_RAN(LR_obj *o) - double random g12 gaussian-like distribution closely matches a Gaussian/No...
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 fu...
float LRf_erlang_CDF(LR_obj *o, float x)
LRf_erlang_CDF(LR_obj *o, float x) - Erlang distribution cumulative distribution function.
A special object for using a user defined CDF.
float LRf_gaus_CDF(LR_obj *o, float x)
LRf_gaus_CDF(LR_obj *o, float x) - float Gaussian/Normal cumulative distribution function.
int LR_rm(LR_obj **o)
LR_rm(LR_obj **o) - destroy the LR object and release allocated memory.
char * LRstrerrno(int LRerrno)
LRstrerrno(int LRerrno) - return the errno code string for the given LibRan errno.
float LRf_gausbm_RAN(LR_obj *o)
LRf_gausbm_RAN(LR_obj *o) - float random Gaussian/Normal distribution using the Box-Muller method...
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...
double LRd_piece_CDF(LR_obj *o, double x)
LRd_piece_CDF(LR_obj *o, double x) - double piecewise uniform cumulative distribution function...
double LRd_lspline_RAN(LR_obj *o)
LRd_lspline_RAN(LR_obj *o) - double random linear spline distribution random variate.
double LRd_uinvcdf_RAN(LR_obj *o)
LRd_uinvcdf_RAN(LR_obj *o) - double random variate via inverse method of the UserCDF() fn...
double LRd_piece_RAN(LR_obj *o)
LRd_piece_RAN(LR_obj *o) - double random piecewise uniform distribution random variate.
double(* pdfd)(LR_obj *, double)
int LR_lspl_new(LR_obj *o, int n)
LR_lspl_new(LR_obj *o, int n) - create a new linear spline object.
float LRi_binomial_PDF(LR_obj *o, int x)
LRi_binomial_PDF(LR_obj *o, int k) - Binomial probablity (or mass) distribution function.
long LR_lgetseed(LR_obj *)
LR_lgetseed(LR_obj *) - get the current seed.
float(* cdfi)(LR_obj *, int)
double LRd_gaus_PDF(LR_obj *o, double x)
LRd_gaus_PDF(LR_obj *o, double x) - double Gaussian/Normal probablity distribution function...
double LRd_cauchymar_RAN(LR_obj *o)
LRd_cauchymar_RAN(LR_obj *o) - double random Cauchy/Lorentz distribution using the polar method and t...
float LRf_uinvcdf_RAN(LR_obj *o)
LRf_uinvcdf_RAN(LR_obj *o) - float random variate via inverse method of the UserCDF() fn...
void LRperror(char *str, int LRerrno)
LRperror(char *str, int LRerrno) - print out explanatory error message to stderr. ...
void LR_isetseed(LR_obj *, int ity)
LR_isetseed(LR_obj *, int X) - set the seed to X.
float LRf_unif_PDF(LR_obj *o, float x)
LRf_unif_PDF(LR_obj *o, float x) - float uniform probablity distribution function.
int LR_lspl_rm(LR_obj *o)
LR_lspl_rm(LR_obj *o) - strip out the LR_lspl object part of LR_obj.
float LRf_piece_PDF(LR_obj *o, float x)
LRf_piece_PDF(LR_obj *o, float x) - float piecewise uniform probablity distribution function...
float LRi_geometric_CDF(LR_obj *o, int x)
LRi_geometric_CDF(LR_obj *o, int x) - Geometric distribution cumulative distribution function...
float LRf_piece_CDF(LR_obj *o, float x)
LRf_piece_CDF(LR_obj *o, float x) - float piecewise uniform cumulative distribution function...
double LRd_cauchy_PDF(LR_obj *o, double x)
LRd_cauchy_PDF(LR_obj *o, double x) - double Cauchy/Lorentz probablity distribution function...
int LR_bin_add(LR_bin *b, double x)
LR_bin_add(LR_bin *b, double x) - collect value to be binned.
double LRd_erlang_PDF(LR_obj *o, double x)
LRd_erlang_PDF(LR_obj *o, double x) - Erlang distribution probablity distribution function...
char * LRstrerror(int LRerrno)
LRstrerror(int LRerrno) - return some explanatory text regarding the given LibRan errno...
double LRd_unif_CDF(LR_obj *o, double x)
LRd_unif_CDF(LR_obj *o, double x) - double uniform cumulative distribution function.
float LRf_nexp_PDF(LR_obj *o, float x)
LRf_nexp_PDF(LR_obj *o, float x) - float negative exponential probablity distribution function...
int LR_set_all(LR_obj *o, char *x,...)
LR_set_all(LR_obj *o, char *x, ...) - set all given LR object parameters.
double LRd_cauchy_RAN(LR_obj *o)
LRd_cauchy_RAN(LR_obj *o) - double random Cauchy/Lorentz distribution using the inversion method on t...
float LRf_nexp_RAN(LR_obj *o)
LRf_nexp_RAN(LR_obj *o) - float random negative exponential distribution using the inversion method...
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). ...
double LRd_uinvcdf_PDF(LR_obj *o, double x)
LRd_uinvcdf_PDF(LR_obj *o, double x) - double probability distribution function approximated from the...
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.
double LRd_gaus_CDF(LR_obj *o, double x)
LRd_gaus_CDF(LR_obj *o, double x) - double Gaussian/Normal cumulative distribution function...
double LRd_gausmar_RAN(LR_obj *o)
LRd_gausmar_RAN(LR_obj *o) - double random Gaussian/Normal distribution using the Marsaglia method wi...
float LRf_erlang_RAN(LR_obj *o)
LRf_erlang_RAN(LR_obj *o) - float random negative exponential distribution using the inversion method...
float LRf_cauchy_RAN(LR_obj *o)
LRf_cauchy_RAN(LR_obj *o) - float random Cauchy/Lorentz distribution using the inversion method...
the fundamental LibRan random variate distribution object
float LRf_gsn4_RAN(LR_obj *o)
LRf_gsn4_RAN(LR_obj *o) - float random g4 gaussian-like (simple bell curve) distribution.
double LRd_erlang_RAN(LR_obj *o)
LRd_erlang_RAN(LR_obj *o) - double random negative exponential distribution using the inversion metho...
double LRd_uinvcdf_CDF(LR_obj *o, double x)
LRd_uinvcdf_CDF(LR_obj *o, double x) - double User supplied cumulative distribution function...
double LRd_lspline_PDF(LR_obj *o, double x)
LRd_lspline_PDF(LR_obj *o, double x) - double linear spline probablity distribution function...
float LRi_binomial_CDF(LR_obj *o, int x)
LRi_binomial_CDF(LR_obj *o, int k) - Binomial distribution cumulative distribution function...
int LR_lspl_norm(LR_obj *o)
LR_lspl_norm(LR_obj *o) - normalize the interval scale factors.
float LRi_poisson_PDF(LR_obj *o, int x)
LRi_poisson_PDF(LR_obj *o, int x) - Poisson probablity (or mass) distribution function.
int LR_bin_rm(LR_bin **b)
LR_bin_rm(LR_bin **b) - remove binning object.
float(* pdfi)(LR_obj *, int)
double LRd_nexp_CDF(LR_obj *o, double x)
LRd_nexp_CDF(LR_obj *o, double x) - double negative exponential cumulative distribution function...
float LRf_gsn2_RAN(LR_obj *o)
LRf_gsn2_RAN(LR_obj *o) - float random g2 gaussian-like (saw tooth) distribution. ...
void LR_lsetseed(LR_obj *, long lty)
LR_lsetseed(LR_obj *, long X) - set the seed to X.
float LRi_PDF(LR_obj *o, int x)
LRi_PDF(LR_obj *o, int x) - probability distribution function.