File indexing completed on 2025-01-17 09:56:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 #undef __BEGIN_DECLS
0034 #undef __END_DECLS
0035 #ifdef __cplusplus
0036 # define __BEGIN_DECLS extern "C" {
0037 # define __END_DECLS }
0038 #else
0039 # define __BEGIN_DECLS
0040 # define __END_DECLS
0041 #endif
0042
0043 __BEGIN_DECLS
0044
0045
0046 #ifndef UNURAN_H_IN_SEEN
0047 #define UNURAN_H_IN_SEEN
0048
0049 #include <limits.h>
0050
0051
0052 #include <stdio.h>
0053
0054
0055 #include <stdlib.h>
0056
0057
0058
0059 #ifndef UNUR_TYPEDEFS_H_SEEN
0060 #define UNUR_TYPEDEFS_H_SEEN
0061 struct unur_distr;
0062 typedef struct unur_distr UNUR_DISTR;
0063 struct unur_par;
0064 typedef struct unur_par UNUR_PAR;
0065 struct unur_gen;
0066 typedef struct unur_gen UNUR_GEN;
0067 struct unur_urng;
0068 typedef struct unur_urng UNUR_URNG;
0069 #define UNUR_URNG_UNURAN 1
0070 typedef double UNUR_FUNCT_CONT (double x, const struct unur_distr *distr);
0071 typedef double UNUR_FUNCT_DISCR (int x, const struct unur_distr *distr);
0072 typedef int UNUR_IFUNCT_DISCR(double x, const struct unur_distr *distr);
0073 typedef double UNUR_FUNCT_CVEC (const double *x, struct unur_distr *distr);
0074 typedef int UNUR_VFUNCT_CVEC(double *result, const double *x, struct unur_distr *distr);
0075 typedef double UNUR_FUNCTD_CVEC(const double *x, int coord, struct unur_distr *distr);
0076 struct unur_slist;
0077 typedef void UNUR_ERROR_HANDLER( const char *objid, const char *file, int line,
0078 const char *errortype, int unur_errno, const char *reason );
0079 #endif
0080
0081
0082
0083
0084 #ifndef URNG_H_SEEN
0085 #define URNG_H_SEEN
0086 UNUR_URNG *unur_get_default_urng( void );
0087 UNUR_URNG *unur_set_default_urng( UNUR_URNG *urng_new );
0088 UNUR_URNG *unur_set_default_urng_aux( UNUR_URNG *urng_new );
0089 UNUR_URNG *unur_get_default_urng_aux( void );
0090 int unur_set_urng( UNUR_PAR *parameters, UNUR_URNG *urng );
0091 UNUR_URNG *unur_chg_urng( UNUR_GEN *generator, UNUR_URNG *urng );
0092 UNUR_URNG *unur_get_urng( UNUR_GEN *generator );
0093 int unur_set_urng_aux( UNUR_PAR *parameters, UNUR_URNG *urng_aux );
0094 int unur_use_urng_aux_default( UNUR_PAR *parameters );
0095 int unur_chgto_urng_aux_default( UNUR_GEN *generator );
0096 UNUR_URNG *unur_chg_urng_aux( UNUR_GEN *generator, UNUR_URNG *urng_aux );
0097 UNUR_URNG *unur_get_urng_aux( UNUR_GEN *generator );
0098 double unur_urng_sample (UNUR_URNG *urng);
0099 double unur_sample_urng (UNUR_GEN *gen);
0100 int unur_urng_sample_array (UNUR_URNG *urng, double *X, int dim);
0101 int unur_urng_reset (UNUR_URNG *urng);
0102 #ifdef UNUR_URNG_UNURAN
0103 int unur_urng_sync (UNUR_URNG *urng);
0104 int unur_urng_seed (UNUR_URNG *urng, unsigned long seed);
0105 int unur_urng_anti (UNUR_URNG *urng, int anti);
0106 int unur_urng_nextsub (UNUR_URNG *urng);
0107 int unur_urng_resetsub (UNUR_URNG *urng);
0108 int unur_gen_sync (UNUR_GEN *generator);
0109 int unur_gen_seed (UNUR_GEN *generator, unsigned long seed);
0110 int unur_gen_anti (UNUR_GEN *generator, int anti);
0111 int unur_gen_reset (UNUR_GEN *generator);
0112 int unur_gen_nextsub (UNUR_GEN *generator);
0113 int unur_gen_resetsub (UNUR_GEN *generator);
0114 UNUR_URNG *unur_urng_new( double (*sampleunif)(void *state), void *state );
0115 void unur_urng_free (UNUR_URNG *urng);
0116 int unur_urng_set_sample_array( UNUR_URNG *urng, unsigned int (*samplearray)(void *state, double *X, int dim) );
0117 int unur_urng_set_sync( UNUR_URNG *urng, void (*sync)(void *state) );
0118 int unur_urng_set_seed( UNUR_URNG *urng, void (*setseed)(void *state, unsigned long seed) );
0119 int unur_urng_set_anti( UNUR_URNG *urng, void (*setanti)(void *state, int anti) );
0120 int unur_urng_set_reset( UNUR_URNG *urng, void (*reset)(void *state) );
0121 int unur_urng_set_nextsub( UNUR_URNG *urng, void (*nextsub)(void *state) );
0122 int unur_urng_set_resetsub( UNUR_URNG *urng, void (*resetsub)(void *state) );
0123 int unur_urng_set_delete( UNUR_URNG *urng, void (*fpdelete)(void *state) );
0124 #endif
0125 #endif
0126
0127
0128
0129
0130 #ifndef URNG_BUILTIN_H_SEEN
0131 #define URNG_BUILTIN_H_SEEN
0132 double unur_urng_MRG31k3p (void *dummy);
0133 void unur_urng_MRG31k3p_seed (void *dummy, unsigned long seed);
0134 void unur_urng_MRG31k3p_reset (void *dummy);
0135 double unur_urng_fish (void *dummy);
0136 void unur_urng_fish_seed (void *dummy, unsigned long seed);
0137 void unur_urng_fish_reset (void *dummy);
0138 double unur_urng_mstd (void *dummy);
0139 void unur_urng_mstd_seed (void *dummy, unsigned long seed);
0140 void unur_urng_mstd_reset (void *dummy);
0141 UNUR_URNG *unur_urng_builtin( void );
0142 UNUR_URNG *unur_urng_builtin_aux( void );
0143 #endif
0144
0145
0146
0147
0148 #ifndef URNG_FVOID_H_SEEN
0149 #define URNG_FVOID_H_SEEN
0150 UNUR_URNG *unur_urng_fvoid_new( double (*urand)(void *state), void (*reset)(void *state) );
0151 #endif
0152
0153
0154
0155
0156 #ifndef URNG_RANDOMSHIFT_H_SEEN
0157 #define URNG_RANDOMSHIFT_H_SEEN
0158 UNUR_URNG *unur_urng_randomshift_new( UNUR_URNG *qrng, UNUR_URNG *srng, int dim );
0159 int unur_urng_randomshift_nextshift( UNUR_URNG *urng );
0160 #endif
0161
0162
0163
0164
0165 enum {
0166 UNUR_DISTR_CONT = 0x010u,
0167 UNUR_DISTR_CEMP = 0x011u,
0168 UNUR_DISTR_CVEC = 0x110u,
0169 UNUR_DISTR_CVEMP = 0x111u,
0170 UNUR_DISTR_MATR = 0x210u,
0171 UNUR_DISTR_DISCR = 0x020u
0172 };
0173 void unur_distr_free( UNUR_DISTR *distribution );
0174 int unur_distr_set_name( UNUR_DISTR *distribution, const char *name );
0175 const char *unur_distr_get_name( const UNUR_DISTR *distribution );
0176 int unur_distr_get_dim( const UNUR_DISTR *distribution );
0177 unsigned int unur_distr_get_type( const UNUR_DISTR *distribution );
0178 int unur_distr_is_cont( const UNUR_DISTR *distribution );
0179 int unur_distr_is_cvec( const UNUR_DISTR *distribution );
0180 int unur_distr_is_cemp( const UNUR_DISTR *distribution );
0181 int unur_distr_is_cvemp( const UNUR_DISTR *distribution );
0182 int unur_distr_is_discr( const UNUR_DISTR *distribution );
0183 int unur_distr_is_matr( const UNUR_DISTR *distribution );
0184 int unur_distr_set_extobj( UNUR_DISTR *distribution, const void *extobj );
0185 const void *unur_distr_get_extobj( const UNUR_DISTR *distribution );
0186 UNUR_DISTR *unur_distr_clone( const UNUR_DISTR *distr );
0187
0188
0189
0190
0191 UNUR_DISTR *unur_distr_cemp_new( void );
0192 int unur_distr_cemp_set_data( UNUR_DISTR *distribution, const double *sample, int n_sample );
0193 int unur_distr_cemp_read_data( UNUR_DISTR *distribution, const char *filename );
0194 int unur_distr_cemp_get_data( const UNUR_DISTR *distribution, const double **sample );
0195 int unur_distr_cemp_set_hist( UNUR_DISTR *distribution, const double *prob, int n_prob, double xmin, double xmax );
0196 int unur_distr_cemp_set_hist_prob( UNUR_DISTR *distribution, const double *prob, int n_prob );
0197 int unur_distr_cemp_set_hist_domain( UNUR_DISTR *distribution, double xmin, double xmax );
0198 int unur_distr_cemp_set_hist_bins( UNUR_DISTR *distribution, const double *bins, int n_bins );
0199
0200
0201
0202
0203 UNUR_DISTR *unur_distr_cont_new( void );
0204 int unur_distr_cont_set_pdf( UNUR_DISTR *distribution, UNUR_FUNCT_CONT *pdf );
0205 int unur_distr_cont_set_dpdf( UNUR_DISTR *distribution, UNUR_FUNCT_CONT *dpdf );
0206 int unur_distr_cont_set_cdf( UNUR_DISTR *distribution, UNUR_FUNCT_CONT *cdf );
0207 int unur_distr_cont_set_invcdf( UNUR_DISTR *distribution, UNUR_FUNCT_CONT *invcdf );
0208 UNUR_FUNCT_CONT *unur_distr_cont_get_pdf( const UNUR_DISTR *distribution );
0209 UNUR_FUNCT_CONT *unur_distr_cont_get_dpdf( const UNUR_DISTR *distribution );
0210 UNUR_FUNCT_CONT *unur_distr_cont_get_cdf( const UNUR_DISTR *distribution );
0211 UNUR_FUNCT_CONT *unur_distr_cont_get_invcdf( const UNUR_DISTR *distribution );
0212 double unur_distr_cont_eval_pdf( double x, const UNUR_DISTR *distribution );
0213 double unur_distr_cont_eval_dpdf( double x, const UNUR_DISTR *distribution );
0214 double unur_distr_cont_eval_cdf( double x, const UNUR_DISTR *distribution );
0215 double unur_distr_cont_eval_invcdf( double u, const UNUR_DISTR *distribution );
0216 int unur_distr_cont_set_logpdf( UNUR_DISTR *distribution, UNUR_FUNCT_CONT *logpdf );
0217 int unur_distr_cont_set_dlogpdf( UNUR_DISTR *distribution, UNUR_FUNCT_CONT *dlogpdf );
0218 int unur_distr_cont_set_logcdf( UNUR_DISTR *distribution, UNUR_FUNCT_CONT *logcdf );
0219 UNUR_FUNCT_CONT *unur_distr_cont_get_logpdf( const UNUR_DISTR *distribution );
0220 UNUR_FUNCT_CONT *unur_distr_cont_get_dlogpdf( const UNUR_DISTR *distribution );
0221 UNUR_FUNCT_CONT *unur_distr_cont_get_logcdf( const UNUR_DISTR *distribution );
0222 double unur_distr_cont_eval_logpdf( double x, const UNUR_DISTR *distribution );
0223 double unur_distr_cont_eval_dlogpdf( double x, const UNUR_DISTR *distribution );
0224 double unur_distr_cont_eval_logcdf( double x, const UNUR_DISTR *distribution );
0225 int unur_distr_cont_set_pdfstr( UNUR_DISTR *distribution, const char *pdfstr );
0226 int unur_distr_cont_set_cdfstr( UNUR_DISTR *distribution, const char *cdfstr );
0227 char *unur_distr_cont_get_pdfstr( const UNUR_DISTR *distribution );
0228 char *unur_distr_cont_get_dpdfstr( const UNUR_DISTR *distribution );
0229 char *unur_distr_cont_get_cdfstr( const UNUR_DISTR *distribution );
0230 int unur_distr_cont_set_pdfparams( UNUR_DISTR *distribution, const double *params, int n_params );
0231 int unur_distr_cont_get_pdfparams( const UNUR_DISTR *distribution, const double **params );
0232 int unur_distr_cont_set_pdfparams_vec( UNUR_DISTR *distribution, int par, const double *param_vec, int n_param_vec );
0233 int unur_distr_cont_get_pdfparams_vec( const UNUR_DISTR *distribution, int par, const double **param_vecs );
0234 int unur_distr_cont_set_logpdfstr( UNUR_DISTR *distribution, const char *logpdfstr );
0235 char *unur_distr_cont_get_logpdfstr( const UNUR_DISTR *distribution );
0236 char *unur_distr_cont_get_dlogpdfstr( const UNUR_DISTR *distribution );
0237 int unur_distr_cont_set_logcdfstr( UNUR_DISTR *distribution, const char *logcdfstr );
0238 char *unur_distr_cont_get_logcdfstr( const UNUR_DISTR *distribution );
0239 int unur_distr_cont_set_domain( UNUR_DISTR *distribution, double left, double right );
0240 int unur_distr_cont_get_domain( const UNUR_DISTR *distribution, double *left, double *right );
0241 int unur_distr_cont_get_truncated( const UNUR_DISTR *distribution, double *left, double *right );
0242 int unur_distr_cont_set_hr( UNUR_DISTR *distribution, UNUR_FUNCT_CONT *hazard );
0243 UNUR_FUNCT_CONT *unur_distr_cont_get_hr( const UNUR_DISTR *distribution );
0244 double unur_distr_cont_eval_hr( double x, const UNUR_DISTR *distribution );
0245 int unur_distr_cont_set_hrstr( UNUR_DISTR *distribution, const char *hrstr );
0246 char *unur_distr_cont_get_hrstr( const UNUR_DISTR *distribution );
0247 int unur_distr_cont_set_mode( UNUR_DISTR *distribution, double mode );
0248 int unur_distr_cont_upd_mode( UNUR_DISTR *distribution );
0249 double unur_distr_cont_get_mode( UNUR_DISTR *distribution );
0250 int unur_distr_cont_set_center( UNUR_DISTR *distribution, double center );
0251 double unur_distr_cont_get_center( const UNUR_DISTR *distribution );
0252 int unur_distr_cont_set_pdfarea( UNUR_DISTR *distribution, double area );
0253 int unur_distr_cont_upd_pdfarea( UNUR_DISTR *distribution );
0254 double unur_distr_cont_get_pdfarea( UNUR_DISTR *distribution );
0255
0256
0257
0258
0259 UNUR_DISTR *unur_distr_cxtrans_new( const UNUR_DISTR *distribution );
0260 const UNUR_DISTR *unur_distr_cxtrans_get_distribution( const UNUR_DISTR *distribution );
0261 int unur_distr_cxtrans_set_alpha( UNUR_DISTR *distribution, double alpha );
0262 int unur_distr_cxtrans_set_rescale( UNUR_DISTR *distribution, double mu, double sigma );
0263 double unur_distr_cxtrans_get_alpha( const UNUR_DISTR *distribution );
0264 double unur_distr_cxtrans_get_mu( const UNUR_DISTR *distribution );
0265 double unur_distr_cxtrans_get_sigma( const UNUR_DISTR *distribution );
0266 int unur_distr_cxtrans_set_logpdfpole( UNUR_DISTR *distribution, double logpdfpole, double dlogpdfpole );
0267 #define unur_distr_cxtrans_get_pdf(distr) unur_distr_cont_get_pdf((distr))
0268 #define unur_distr_cxtrans_get_dpdf(distr) unur_distr_cont_get_dpdf((distr))
0269 #define unur_distr_cxtrans_get_cdf(distr) unur_distr_cont_get_cdf((distr))
0270 #define unur_distr_cxtrans_eval_pdf(x,distr) unur_distr_cont_eval_pdf((x),(distr))
0271 #define unur_distr_cxtrans_eval_dpdf(x,distr) unur_distr_cont_eval_dpdf((x),(distr))
0272 #define unur_distr_cxtrans_eval_cdf(x,distr) unur_distr_cont_eval_cdf((x),(distr))
0273 int unur_distr_cxtrans_set_domain( UNUR_DISTR *distribution, double left, double right );
0274 #define unur_distr_cxtrans_get_domain(distr,left,right) unur_distr_cont_get_domain((distr),(left),(right))
0275 #define unur_distr_cxtrans_get_truncated(distr,left,right) unur_distr_cont_get_truncated((distr),(left),(right))
0276 #define unur_distr_cxtrans_set_mode(distr,mode) unur_distr_cont_set_mode((distr),(mode))
0277 #define unur_distr_cxtrans_upd_mode(distr) unur_distr_cont_upd_mode((distr))
0278 #define unur_distr_cxtrans_get_mode(distr) unur_distr_cont_get_mode((distr))
0279 #define unur_distr_cxtrans_set_pdfarea(distr,area) unur_distr_cont_set_pdfarea((distr),(area))
0280 #define unur_distr_cxtrans_upd_pdfarea(distr) unur_distr_cont_upd_pdfarea((distr))
0281 #define unur_distr_cxtrans_get_pdfarea(distr) unur_distr_cont_get_pdfarea((distr))
0282
0283
0284
0285
0286 UNUR_DISTR *unur_distr_corder_new( const UNUR_DISTR *distribution, int n, int k );
0287 const UNUR_DISTR *unur_distr_corder_get_distribution( const UNUR_DISTR *distribution );
0288 int unur_distr_corder_set_rank( UNUR_DISTR *distribution, int n, int k );
0289 int unur_distr_corder_get_rank( const UNUR_DISTR *distribution, int *n, int *k );
0290 #define unur_distr_corder_get_pdf(distr) unur_distr_cont_get_pdf((distr))
0291 #define unur_distr_corder_get_dpdf(distr) unur_distr_cont_get_dpdf((distr))
0292 #define unur_distr_corder_get_cdf(distr) unur_distr_cont_get_cdf((distr))
0293 #define unur_distr_corder_eval_pdf(x,distr) unur_distr_cont_eval_pdf((x),(distr))
0294 #define unur_distr_corder_eval_dpdf(x,distr) unur_distr_cont_eval_dpdf((x),(distr))
0295 #define unur_distr_corder_eval_cdf(x,distr) unur_distr_cont_eval_cdf((x),(distr))
0296 #define unur_distr_corder_set_pdfparams(distr,params,n) unur_distr_cont_set_pdfparams((distr),(params),(n))
0297 #define unur_distr_corder_get_pdfparams(distr,params) unur_distr_cont_get_pdfparams((distr),(params))
0298 #define unur_distr_corder_set_domain(distr,left,right) unur_distr_cont_set_domain((distr),(left),(right))
0299 #define unur_distr_corder_get_domain(distr,left,right) unur_distr_cont_get_domain((distr),(left),(right))
0300 #define unur_distr_corder_get_truncated(distr,left,right) unur_distr_cont_get_truncated((distr),(left),(right))
0301 #define unur_distr_corder_set_mode(distr,mode) unur_distr_cont_set_mode((distr),(mode))
0302 #define unur_distr_corder_upd_mode(distr) unur_distr_cont_upd_mode((distr))
0303 #define unur_distr_corder_get_mode(distr) unur_distr_cont_get_mode((distr))
0304 #define unur_distr_corder_set_pdfarea(distr,area) unur_distr_cont_set_pdfarea((distr),(area))
0305 #define unur_distr_corder_upd_pdfarea(distr) unur_distr_cont_upd_pdfarea((distr))
0306 #define unur_distr_corder_get_pdfarea(distr) unur_distr_cont_get_pdfarea((distr))
0307
0308
0309
0310
0311 UNUR_DISTR *unur_distr_cvec_new( int dim );
0312 int unur_distr_cvec_set_pdf( UNUR_DISTR *distribution, UNUR_FUNCT_CVEC *pdf );
0313 int unur_distr_cvec_set_dpdf( UNUR_DISTR *distribution, UNUR_VFUNCT_CVEC *dpdf );
0314 int unur_distr_cvec_set_pdpdf( UNUR_DISTR *distribution, UNUR_FUNCTD_CVEC *pdpdf );
0315 UNUR_FUNCT_CVEC *unur_distr_cvec_get_pdf( const UNUR_DISTR *distribution );
0316 UNUR_VFUNCT_CVEC *unur_distr_cvec_get_dpdf( const UNUR_DISTR *distribution );
0317 UNUR_FUNCTD_CVEC *unur_distr_cvec_get_pdpdf( const UNUR_DISTR *distribution );
0318 double unur_distr_cvec_eval_pdf( const double *x, UNUR_DISTR *distribution );
0319 int unur_distr_cvec_eval_dpdf( double *result, const double *x, UNUR_DISTR *distribution );
0320 double unur_distr_cvec_eval_pdpdf( const double *x, int coord, UNUR_DISTR *distribution );
0321 int unur_distr_cvec_set_logpdf( UNUR_DISTR *distribution, UNUR_FUNCT_CVEC *logpdf );
0322 int unur_distr_cvec_set_dlogpdf( UNUR_DISTR *distribution, UNUR_VFUNCT_CVEC *dlogpdf );
0323 int unur_distr_cvec_set_pdlogpdf( UNUR_DISTR *distribution, UNUR_FUNCTD_CVEC *pdlogpdf );
0324 UNUR_FUNCT_CVEC *unur_distr_cvec_get_logpdf( const UNUR_DISTR *distribution );
0325 UNUR_VFUNCT_CVEC *unur_distr_cvec_get_dlogpdf( const UNUR_DISTR *distribution );
0326 UNUR_FUNCTD_CVEC *unur_distr_cvec_get_pdlogpdf( const UNUR_DISTR *distribution );
0327 double unur_distr_cvec_eval_logpdf( const double *x, UNUR_DISTR *distribution );
0328 int unur_distr_cvec_eval_dlogpdf( double *result, const double *x, UNUR_DISTR *distribution );
0329 double unur_distr_cvec_eval_pdlogpdf( const double *x, int coord, UNUR_DISTR *distribution );
0330 int unur_distr_cvec_set_mean( UNUR_DISTR *distribution, const double *mean );
0331 const double *unur_distr_cvec_get_mean( const UNUR_DISTR *distribution );
0332 int unur_distr_cvec_set_covar( UNUR_DISTR *distribution, const double *covar );
0333 int unur_distr_cvec_set_covar_inv( UNUR_DISTR *distribution, const double *covar_inv );
0334 const double *unur_distr_cvec_get_covar( const UNUR_DISTR *distribution );
0335 const double *unur_distr_cvec_get_cholesky( const UNUR_DISTR *distribution );
0336 const double *unur_distr_cvec_get_covar_inv( UNUR_DISTR *distribution );
0337 int unur_distr_cvec_set_rankcorr( UNUR_DISTR *distribution, const double *rankcorr );
0338 const double *unur_distr_cvec_get_rankcorr( const UNUR_DISTR *distribution );
0339 const double *unur_distr_cvec_get_rk_cholesky( const UNUR_DISTR *distribution );
0340 int unur_distr_cvec_set_marginals( UNUR_DISTR *distribution, UNUR_DISTR *marginal );
0341 int unur_distr_cvec_set_marginal_array( UNUR_DISTR *distribution, UNUR_DISTR **marginals );
0342 int unur_distr_cvec_set_marginal_list( UNUR_DISTR *distribution, ... );
0343 const UNUR_DISTR *unur_distr_cvec_get_marginal( const UNUR_DISTR *distribution, int n );
0344 int unur_distr_cvec_set_pdfparams( UNUR_DISTR *distribution, const double *params, int n_params );
0345 int unur_distr_cvec_get_pdfparams( const UNUR_DISTR *distribution, const double **params );
0346 int unur_distr_cvec_set_pdfparams_vec( UNUR_DISTR *distribution, int par, const double *param_vec, int n_params );
0347 int unur_distr_cvec_get_pdfparams_vec( const UNUR_DISTR *distribution, int par, const double **param_vecs );
0348 int unur_distr_cvec_set_domain_rect( UNUR_DISTR *distribution, const double *lowerleft, const double *upperright );
0349 int unur_distr_cvec_is_indomain( const double *x, const UNUR_DISTR *distribution );
0350 int unur_distr_cvec_set_mode( UNUR_DISTR *distribution, const double *mode );
0351 int unur_distr_cvec_upd_mode( UNUR_DISTR *distribution );
0352 const double *unur_distr_cvec_get_mode( UNUR_DISTR *distribution );
0353 int unur_distr_cvec_set_center( UNUR_DISTR *distribution, const double *center );
0354 const double *unur_distr_cvec_get_center( UNUR_DISTR *distribution );
0355 int unur_distr_cvec_set_pdfvol( UNUR_DISTR *distribution, double volume );
0356 int unur_distr_cvec_upd_pdfvol( UNUR_DISTR *distribution );
0357 double unur_distr_cvec_get_pdfvol( UNUR_DISTR *distribution );
0358
0359
0360
0361
0362 UNUR_DISTR *unur_distr_condi_new( const UNUR_DISTR *distribution, const double *pos, const double *dir, int k );
0363 int unur_distr_condi_set_condition( struct unur_distr *distribution, const double *pos, const double *dir, int k );
0364 int unur_distr_condi_get_condition( struct unur_distr *distribution, const double **pos, const double **dir, int *k );
0365 const UNUR_DISTR *unur_distr_condi_get_distribution( const UNUR_DISTR *distribution );
0366
0367
0368
0369
0370 UNUR_DISTR *unur_distr_cvemp_new( int dim );
0371 int unur_distr_cvemp_set_data( UNUR_DISTR *distribution, const double *sample, int n_sample );
0372 int unur_distr_cvemp_read_data( UNUR_DISTR *distribution, const char *filename );
0373 int unur_distr_cvemp_get_data( const UNUR_DISTR *distribution, const double **sample );
0374
0375
0376
0377
0378 UNUR_DISTR *unur_distr_discr_new( void );
0379 int unur_distr_discr_set_pv( UNUR_DISTR *distribution, const double *pv, int n_pv );
0380 int unur_distr_discr_make_pv( UNUR_DISTR *distribution );
0381 int unur_distr_discr_get_pv( const UNUR_DISTR *distribution, const double **pv );
0382 int unur_distr_discr_set_pmf( UNUR_DISTR *distribution, UNUR_FUNCT_DISCR *pmf );
0383 int unur_distr_discr_set_cdf( UNUR_DISTR *distribution, UNUR_FUNCT_DISCR *cdf );
0384 int unur_distr_discr_set_invcdf( UNUR_DISTR *distribution, UNUR_IFUNCT_DISCR *invcdf );
0385 UNUR_FUNCT_DISCR *unur_distr_discr_get_pmf( const UNUR_DISTR *distribution );
0386 UNUR_FUNCT_DISCR *unur_distr_discr_get_cdf( const UNUR_DISTR *distribution );
0387 UNUR_IFUNCT_DISCR *unur_distr_discr_get_invcdf( const UNUR_DISTR *distribution );
0388 double unur_distr_discr_eval_pv(int k, const UNUR_DISTR *distribution );
0389 double unur_distr_discr_eval_pmf( int k, const UNUR_DISTR *distribution );
0390 double unur_distr_discr_eval_cdf( int k, const UNUR_DISTR *distribution );
0391 int unur_distr_discr_eval_invcdf( double u, const UNUR_DISTR *distribution );
0392 int unur_distr_discr_set_pmfstr( UNUR_DISTR *distribution, const char *pmfstr );
0393 int unur_distr_discr_set_cdfstr( UNUR_DISTR *distribution, const char *cdfstr );
0394 char *unur_distr_discr_get_pmfstr( const UNUR_DISTR *distribution );
0395 char *unur_distr_discr_get_cdfstr( const UNUR_DISTR *distribution );
0396 int unur_distr_discr_set_pmfparams( UNUR_DISTR *distribution, const double *params, int n_params );
0397 int unur_distr_discr_get_pmfparams( const UNUR_DISTR *distribution, const double **params );
0398 int unur_distr_discr_set_domain( UNUR_DISTR *distribution, int left, int right );
0399 int unur_distr_discr_get_domain( const UNUR_DISTR *distribution, int *left, int *right );
0400 int unur_distr_discr_set_mode( UNUR_DISTR *distribution, int mode );
0401 int unur_distr_discr_upd_mode( UNUR_DISTR *distribution );
0402 int unur_distr_discr_get_mode( UNUR_DISTR *distribution );
0403 int unur_distr_discr_set_pmfsum( UNUR_DISTR *distribution, double sum );
0404 int unur_distr_discr_upd_pmfsum( UNUR_DISTR *distribution );
0405 double unur_distr_discr_get_pmfsum( UNUR_DISTR *distribution );
0406
0407
0408
0409
0410 UNUR_DISTR *unur_distr_matr_new( int n_rows, int n_cols );
0411 int unur_distr_matr_get_dim( const UNUR_DISTR *distribution, int *n_rows, int *n_cols );
0412
0413
0414
0415
0416 UNUR_PAR *unur_auto_new( const UNUR_DISTR *distribution );
0417 int unur_auto_set_logss( UNUR_PAR *parameters, int logss );
0418
0419
0420
0421
0422 UNUR_PAR *unur_dari_new( const UNUR_DISTR *distribution );
0423 int unur_dari_set_squeeze( UNUR_PAR *parameters, int squeeze );
0424 int unur_dari_set_tablesize( UNUR_PAR *parameters, int size );
0425 int unur_dari_set_cpfactor( UNUR_PAR *parameters, double cp_factor );
0426 int unur_dari_set_verify( UNUR_PAR *parameters, int verify );
0427 int unur_dari_chg_verify( UNUR_GEN *generator, int verify );
0428
0429
0430
0431
0432 UNUR_PAR *unur_dau_new( const UNUR_DISTR *distribution );
0433 int unur_dau_set_urnfactor( UNUR_PAR *parameters, double factor );
0434
0435
0436
0437
0438 UNUR_PAR *unur_dgt_new( const UNUR_DISTR *distribution );
0439 int unur_dgt_set_guidefactor( UNUR_PAR *parameters, double factor );
0440 int unur_dgt_set_variant( UNUR_PAR *parameters, unsigned variant );
0441 int unur_dgt_eval_invcdf_recycle( const UNUR_GEN *generator, double u, double *recycle );
0442 int unur_dgt_eval_invcdf( const UNUR_GEN *generator, double u );
0443
0444
0445
0446
0447 UNUR_PAR *unur_dsrou_new( const UNUR_DISTR *distribution );
0448 int unur_dsrou_set_cdfatmode( UNUR_PAR *parameters, double Fmode );
0449 int unur_dsrou_set_verify( UNUR_PAR *parameters, int verify );
0450 int unur_dsrou_chg_verify( UNUR_GEN *generator, int verify );
0451 int unur_dsrou_chg_cdfatmode( UNUR_GEN *generator, double Fmode );
0452
0453
0454
0455
0456 UNUR_PAR *unur_dss_new( const UNUR_DISTR *distribution );
0457
0458
0459
0460
0461 UNUR_PAR *unur_arou_new( const UNUR_DISTR *distribution );
0462 int unur_arou_set_usedars( UNUR_PAR *parameters, int usedars );
0463 int unur_arou_set_darsfactor( UNUR_PAR *parameters, double factor );
0464 int unur_arou_set_max_sqhratio( UNUR_PAR *parameters, double max_ratio );
0465 double unur_arou_get_sqhratio( const UNUR_GEN *generator );
0466 double unur_arou_get_hatarea( const UNUR_GEN *generator );
0467 double unur_arou_get_squeezearea( const UNUR_GEN *generator );
0468 int unur_arou_set_max_segments( UNUR_PAR *parameters, int max_segs );
0469 int unur_arou_set_cpoints( UNUR_PAR *parameters, int n_stp, const double *stp );
0470 int unur_arou_set_usecenter( UNUR_PAR *parameters, int usecenter );
0471 int unur_arou_set_guidefactor( UNUR_PAR *parameters, double factor );
0472 int unur_arou_set_verify( UNUR_PAR *parameters, int verify );
0473 int unur_arou_chg_verify( UNUR_GEN *generator, int verify );
0474 int unur_arou_set_pedantic( UNUR_PAR *parameters, int pedantic );
0475
0476
0477
0478
0479 UNUR_PAR *unur_ars_new( const UNUR_DISTR* distribution );
0480 int unur_ars_set_max_intervals( UNUR_PAR *parameters, int max_ivs );
0481 int unur_ars_set_cpoints( UNUR_PAR *parameters, int n_cpoints, const double *cpoints );
0482 int unur_ars_set_reinit_percentiles( UNUR_PAR *parameters, int n_percentiles, const double *percentiles );
0483 int unur_ars_chg_reinit_percentiles( UNUR_GEN *generator, int n_percentiles, const double *percentiles );
0484 int unur_ars_set_reinit_ncpoints( UNUR_PAR *parameters, int ncpoints );
0485 int unur_ars_chg_reinit_ncpoints( UNUR_GEN *generator, int ncpoints );
0486 int unur_ars_set_max_iter( UNUR_PAR *parameters, int max_iter );
0487 int unur_ars_set_verify( UNUR_PAR *parameters, int verify );
0488 int unur_ars_chg_verify( UNUR_GEN *generator, int verify );
0489 int unur_ars_set_pedantic( UNUR_PAR *parameters, int pedantic );
0490 double unur_ars_get_loghatarea( const UNUR_GEN *generator );
0491 double unur_ars_eval_invcdfhat( const UNUR_GEN *generator, double u );
0492
0493
0494
0495
0496 UNUR_PAR *unur_hinv_new( const UNUR_DISTR *distribution );
0497 int unur_hinv_set_order( UNUR_PAR *parameters, int order);
0498 int unur_hinv_set_u_resolution( UNUR_PAR *parameters, double u_resolution);
0499 int unur_hinv_set_cpoints( UNUR_PAR *parameters, const double *stp, int n_stp );
0500 int unur_hinv_set_boundary( UNUR_PAR *parameters, double left, double right );
0501 int unur_hinv_set_guidefactor( UNUR_PAR *parameters, double factor );
0502 int unur_hinv_set_max_intervals( UNUR_PAR *parameters, int max_ivs );
0503 int unur_hinv_get_n_intervals( const UNUR_GEN *generator );
0504 double unur_hinv_eval_approxinvcdf( const UNUR_GEN *generator, double u );
0505 int unur_hinv_chg_truncated( UNUR_GEN *generator, double left, double right );
0506 int unur_hinv_estimate_error( const UNUR_GEN *generator, int samplesize, double *max_error, double *MAE );
0507
0508
0509
0510
0511 UNUR_PAR *unur_hrb_new( const UNUR_DISTR *distribution );
0512 int unur_hrb_set_upperbound( UNUR_PAR *parameters, double upperbound );
0513 int unur_hrb_set_verify( UNUR_PAR *parameters, int verify );
0514 int unur_hrb_chg_verify( UNUR_GEN *generator, int verify );
0515
0516
0517
0518
0519 UNUR_PAR *unur_hrd_new( const UNUR_DISTR *distribution );
0520 int unur_hrd_set_verify( UNUR_PAR *parameters, int verify );
0521 int unur_hrd_chg_verify( UNUR_GEN *generator, int verify );
0522
0523
0524
0525
0526 UNUR_PAR *unur_hri_new( const UNUR_DISTR *distribution );
0527 int unur_hri_set_p0( UNUR_PAR *parameters, double p0 );
0528 int unur_hri_set_verify( UNUR_PAR *parameters, int verify );
0529 int unur_hri_chg_verify( UNUR_GEN *generator, int verify );
0530
0531
0532
0533
0534 UNUR_PAR *unur_itdr_new( const UNUR_DISTR *distribution );
0535 int unur_itdr_set_xi( UNUR_PAR *parameters, double xi );
0536 int unur_itdr_set_cp( UNUR_PAR *parameters, double cp );
0537 int unur_itdr_set_ct( UNUR_PAR *parameters, double ct );
0538 double unur_itdr_get_xi( UNUR_GEN *generator );
0539 double unur_itdr_get_cp( UNUR_GEN *generator );
0540 double unur_itdr_get_ct( UNUR_GEN *generator );
0541 double unur_itdr_get_area( UNUR_GEN *generator );
0542 int unur_itdr_set_verify( UNUR_PAR *parameters, int verify );
0543 int unur_itdr_chg_verify( UNUR_GEN *generator, int verify );
0544
0545
0546
0547
0548 UNUR_PAR *unur_mcorr_new( const UNUR_DISTR *distribution );
0549 int unur_mcorr_set_eigenvalues( UNUR_PAR *par, const double *eigenvalues );
0550 int unur_mcorr_chg_eigenvalues( UNUR_GEN *gen, const double *eigenvalues );
0551
0552
0553
0554
0555 UNUR_PAR *unur_ninv_new( const UNUR_DISTR *distribution );
0556 int unur_ninv_set_useregula( UNUR_PAR *parameters );
0557 int unur_ninv_set_usenewton( UNUR_PAR *parameters );
0558 int unur_ninv_set_usebisect( UNUR_PAR *parameters );
0559 int unur_ninv_set_max_iter( UNUR_PAR *parameters, int max_iter );
0560 int unur_ninv_chg_max_iter(UNUR_GEN *generator, int max_iter);
0561 int unur_ninv_set_x_resolution( UNUR_PAR *parameters, double x_resolution);
0562 int unur_ninv_chg_x_resolution(UNUR_GEN *generator, double x_resolution);
0563 int unur_ninv_set_u_resolution( UNUR_PAR *parameters, double u_resolution);
0564 int unur_ninv_chg_u_resolution(UNUR_GEN *generator, double u_resolution);
0565 int unur_ninv_set_start( UNUR_PAR *parameters, double left, double right);
0566 int unur_ninv_chg_start(UNUR_GEN *gen, double left, double right);
0567 int unur_ninv_set_table(UNUR_PAR *parameters, int no_of_points);
0568 int unur_ninv_chg_table(UNUR_GEN *gen, int no_of_points);
0569 int unur_ninv_chg_truncated(UNUR_GEN *gen, double left, double right);
0570 double unur_ninv_eval_approxinvcdf( const UNUR_GEN *generator, double u );
0571
0572
0573
0574
0575 UNUR_PAR *unur_nrou_new( const UNUR_DISTR *distribution );
0576 int unur_nrou_set_u( UNUR_PAR *parameters, double umin, double umax );
0577 int unur_nrou_set_v( UNUR_PAR *parameters, double vmax );
0578 int unur_nrou_set_r( UNUR_PAR *parameters, double r );
0579 int unur_nrou_set_center( UNUR_PAR *parameters, double center );
0580 int unur_nrou_set_verify( UNUR_PAR *parameters, int verify );
0581 int unur_nrou_chg_verify( UNUR_GEN *generator, int verify );
0582
0583
0584
0585
0586 UNUR_PAR *unur_pinv_new( const UNUR_DISTR *distribution );
0587 int unur_pinv_set_order( UNUR_PAR *parameters, int order);
0588 int unur_pinv_set_smoothness( UNUR_PAR *parameters, int smoothness);
0589 int unur_pinv_set_u_resolution( UNUR_PAR *parameters, double u_resolution);
0590 int unur_pinv_set_use_upoints( UNUR_PAR *parameters, int use_upoints );
0591 int unur_pinv_set_usepdf( UNUR_PAR *parameters );
0592 int unur_pinv_set_usecdf( UNUR_PAR *parameters );
0593 int unur_pinv_set_boundary( UNUR_PAR *parameters, double left, double right );
0594 int unur_pinv_set_searchboundary( UNUR_PAR *parameters, int left, int right );
0595 int unur_pinv_set_max_intervals( UNUR_PAR *parameters, int max_ivs );
0596 int unur_pinv_get_n_intervals( const UNUR_GEN *generator );
0597 int unur_pinv_set_keepcdf( UNUR_PAR *parameters, int keepcdf);
0598 double unur_pinv_eval_approxinvcdf( const UNUR_GEN *generator, double u );
0599 double unur_pinv_eval_approxcdf( const UNUR_GEN *generator, double x );
0600 int unur_pinv_estimate_error( const UNUR_GEN *generator, int samplesize, double *max_error, double *MAE );
0601
0602
0603
0604
0605 UNUR_PAR *unur_srou_new( const UNUR_DISTR *distribution );
0606 int unur_srou_set_r( UNUR_PAR *parameters, double r );
0607 int unur_srou_set_cdfatmode( UNUR_PAR *parameters, double Fmode );
0608 int unur_srou_set_pdfatmode( UNUR_PAR *parameters, double fmode );
0609 int unur_srou_set_usesqueeze( UNUR_PAR *parameters, int usesqueeze );
0610 int unur_srou_set_usemirror( UNUR_PAR *parameters, int usemirror );
0611 int unur_srou_set_verify( UNUR_PAR *parameters, int verify );
0612 int unur_srou_chg_verify( UNUR_GEN *generator, int verify );
0613 int unur_srou_chg_cdfatmode( UNUR_GEN *generator, double Fmode );
0614 int unur_srou_chg_pdfatmode( UNUR_GEN *generator, double fmode );
0615
0616
0617
0618
0619 UNUR_PAR *unur_ssr_new( const UNUR_DISTR *distribution );
0620 int unur_ssr_set_cdfatmode( UNUR_PAR *parameters, double Fmode );
0621 int unur_ssr_set_pdfatmode( UNUR_PAR *parameters, double fmode );
0622 int unur_ssr_set_usesqueeze( UNUR_PAR *parameters, int usesqueeze );
0623 int unur_ssr_set_verify( UNUR_PAR *parameters, int verify );
0624 int unur_ssr_chg_verify( UNUR_GEN *generator, int verify );
0625 int unur_ssr_chg_cdfatmode( UNUR_GEN *generator, double Fmode );
0626 int unur_ssr_chg_pdfatmode( UNUR_GEN *generator, double fmode );
0627
0628
0629
0630
0631 UNUR_PAR *unur_tabl_new( const UNUR_DISTR* distribution );
0632 int unur_tabl_set_variant_ia( UNUR_PAR *parameters, int use_ia );
0633 int unur_tabl_set_cpoints( UNUR_PAR *parameters, int n_cpoints, const double *cpoints );
0634 int unur_tabl_set_nstp( UNUR_PAR *parameters, int n_stp );
0635 int unur_tabl_set_useear( UNUR_PAR *parameters, int useear );
0636 int unur_tabl_set_areafraction( UNUR_PAR *parameters, double fraction );
0637 int unur_tabl_set_usedars( UNUR_PAR *parameters, int usedars );
0638 int unur_tabl_set_darsfactor( UNUR_PAR *parameters, double factor );
0639 int unur_tabl_set_variant_splitmode( UNUR_PAR *parameters, unsigned splitmode );
0640 int unur_tabl_set_max_sqhratio( UNUR_PAR *parameters, double max_ratio );
0641 double unur_tabl_get_sqhratio( const UNUR_GEN *generator );
0642 double unur_tabl_get_hatarea( const UNUR_GEN *generator );
0643 double unur_tabl_get_squeezearea( const UNUR_GEN *generator );
0644 int unur_tabl_set_max_intervals( UNUR_PAR *parameters, int max_ivs );
0645 int unur_tabl_get_n_intervals( const UNUR_GEN *generator );
0646 int unur_tabl_set_slopes( UNUR_PAR *parameters, const double *slopes, int n_slopes );
0647 int unur_tabl_set_guidefactor( UNUR_PAR *parameters, double factor );
0648 int unur_tabl_set_boundary( UNUR_PAR *parameters, double left, double right );
0649 int unur_tabl_chg_truncated(UNUR_GEN *gen, double left, double right);
0650 int unur_tabl_set_verify( UNUR_PAR *parameters, int verify );
0651 int unur_tabl_chg_verify( UNUR_GEN *generator, int verify );
0652 int unur_tabl_set_pedantic( UNUR_PAR *parameters, int pedantic );
0653
0654
0655
0656
0657 UNUR_PAR *unur_tdr_new( const UNUR_DISTR* distribution );
0658 int unur_tdr_set_c( UNUR_PAR *parameters, double c );
0659 int unur_tdr_set_variant_gw( UNUR_PAR *parameters );
0660 int unur_tdr_set_variant_ps( UNUR_PAR *parameters );
0661 int unur_tdr_set_variant_ia( UNUR_PAR *parameters );
0662 int unur_tdr_set_usedars( UNUR_PAR *parameters, int usedars );
0663 int unur_tdr_set_darsfactor( UNUR_PAR *parameters, double factor );
0664 int unur_tdr_set_cpoints( UNUR_PAR *parameters, int n_stp, const double *stp );
0665 int unur_tdr_set_reinit_percentiles( UNUR_PAR *parameters, int n_percentiles, const double *percentiles );
0666 int unur_tdr_chg_reinit_percentiles( UNUR_GEN *generator, int n_percentiles, const double *percentiles );
0667 int unur_tdr_set_reinit_ncpoints( UNUR_PAR *parameters, int ncpoints );
0668 int unur_tdr_chg_reinit_ncpoints( UNUR_GEN *generator, int ncpoints );
0669 int unur_tdr_chg_truncated(UNUR_GEN *gen, double left, double right);
0670 int unur_tdr_set_max_sqhratio( UNUR_PAR *parameters, double max_ratio );
0671 double unur_tdr_get_sqhratio( const UNUR_GEN *generator );
0672 double unur_tdr_get_hatarea( const UNUR_GEN *generator );
0673 double unur_tdr_get_squeezearea( const UNUR_GEN *generator );
0674 int unur_tdr_set_max_intervals( UNUR_PAR *parameters, int max_ivs );
0675 int unur_tdr_set_usecenter( UNUR_PAR *parameters, int usecenter );
0676 int unur_tdr_set_usemode( UNUR_PAR *parameters, int usemode );
0677 int unur_tdr_set_guidefactor( UNUR_PAR *parameters, double factor );
0678 int unur_tdr_set_verify( UNUR_PAR *parameters, int verify );
0679 int unur_tdr_chg_verify( UNUR_GEN *generator, int verify );
0680 int unur_tdr_set_pedantic( UNUR_PAR *parameters, int pedantic );
0681 double unur_tdr_eval_invcdfhat( const UNUR_GEN *generator, double u,
0682 double *hx, double *fx, double *sqx );
0683 int _unur_tdr_is_ARS_running( const UNUR_GEN *generator );
0684
0685
0686
0687
0688 UNUR_PAR *unur_utdr_new( const UNUR_DISTR *distribution );
0689 int unur_utdr_set_pdfatmode( UNUR_PAR *parameters, double fmode );
0690 int unur_utdr_set_cpfactor( UNUR_PAR *parameters, double cp_factor );
0691 int unur_utdr_set_deltafactor( UNUR_PAR *parameters, double delta );
0692 int unur_utdr_set_verify( UNUR_PAR *parameters, int verify );
0693 int unur_utdr_chg_verify( UNUR_GEN *generator, int verify );
0694 int unur_utdr_chg_pdfatmode( UNUR_GEN *generator, double fmode );
0695
0696
0697
0698
0699 UNUR_PAR *unur_empk_new( const UNUR_DISTR *distribution );
0700 int unur_empk_set_kernel( UNUR_PAR *parameters, unsigned kernel);
0701 int unur_empk_set_kernelgen( UNUR_PAR *parameters, const UNUR_GEN *kernelgen, double alpha, double kernelvar );
0702 int unur_empk_set_beta( UNUR_PAR *parameters, double beta );
0703 int unur_empk_set_smoothing( UNUR_PAR *parameters, double smoothing );
0704 int unur_empk_chg_smoothing( UNUR_GEN *generator, double smoothing );
0705 int unur_empk_set_varcor( UNUR_PAR *parameters, int varcor );
0706 int unur_empk_chg_varcor( UNUR_GEN *generator, int varcor );
0707 int unur_empk_set_positive( UNUR_PAR *parameters, int positive );
0708
0709
0710
0711
0712 UNUR_PAR *unur_empl_new( const UNUR_DISTR *distribution );
0713
0714
0715
0716
0717 UNUR_PAR *unur_hist_new( const UNUR_DISTR *distribution );
0718
0719
0720
0721
0722 UNUR_PAR *unur_mvtdr_new( const UNUR_DISTR *distribution );
0723 int unur_mvtdr_set_stepsmin( UNUR_PAR *parameters, int stepsmin );
0724 int unur_mvtdr_set_boundsplitting( UNUR_PAR *parameters, double boundsplitting );
0725 int unur_mvtdr_set_maxcones( UNUR_PAR *parameters, int maxcones );
0726 int unur_mvtdr_get_ncones( const UNUR_GEN *generator );
0727 double unur_mvtdr_get_hatvol( const UNUR_GEN *generator );
0728 int unur_mvtdr_set_verify( UNUR_PAR *parameters, int verify );
0729 int unur_mvtdr_chg_verify( UNUR_GEN *generator, int verify );
0730
0731
0732
0733
0734 UNUR_PAR *unur_norta_new( const UNUR_DISTR *distribution );
0735
0736
0737
0738
0739 UNUR_PAR *unur_vempk_new( const UNUR_DISTR *distribution );
0740 int unur_vempk_set_smoothing( UNUR_PAR *parameters, double smoothing );
0741 int unur_vempk_chg_smoothing( UNUR_GEN *generator, double smoothing );
0742 int unur_vempk_set_varcor( UNUR_PAR *parameters, int varcor );
0743 int unur_vempk_chg_varcor( UNUR_GEN *generator, int varcor );
0744
0745
0746
0747
0748 UNUR_PAR *unur_vnrou_new( const UNUR_DISTR *distribution );
0749 int unur_vnrou_set_u( UNUR_PAR *parameters, double *umin, double *umax );
0750 int unur_vnrou_chg_u( UNUR_GEN *generator, double *umin, double *umax );
0751 int unur_vnrou_set_v( UNUR_PAR *parameters, double vmax );
0752 int unur_vnrou_chg_v( UNUR_GEN *generator, double vmax );
0753 int unur_vnrou_set_r( UNUR_PAR *parameters, double r );
0754 int unur_vnrou_set_verify( UNUR_PAR *parameters, int verify );
0755 int unur_vnrou_chg_verify( UNUR_GEN *generator, int verify );
0756 double unur_vnrou_get_volumehat( const UNUR_GEN *generator );
0757
0758
0759
0760
0761 UNUR_PAR *unur_gibbs_new( const UNUR_DISTR *distribution );
0762 int unur_gibbs_set_variant_coordinate( UNUR_PAR *parameters );
0763 int unur_gibbs_set_variant_random_direction( UNUR_PAR *parameters );
0764 int unur_gibbs_set_c( UNUR_PAR *parameters, double c );
0765 int unur_gibbs_set_startingpoint( UNUR_PAR *parameters, const double *x0 );
0766 int unur_gibbs_set_thinning( UNUR_PAR *parameters, int thinning );
0767 int unur_gibbs_set_burnin( UNUR_PAR *parameters, int burnin );
0768 const double *unur_gibbs_get_state( UNUR_GEN *generator );
0769 int unur_gibbs_chg_state( UNUR_GEN *generator, const double *state );
0770 int unur_gibbs_reset_state( UNUR_GEN *generator );
0771
0772
0773
0774
0775 UNUR_PAR *unur_hitro_new( const UNUR_DISTR *distribution );
0776 int unur_hitro_set_variant_coordinate( UNUR_PAR *parameters );
0777 int unur_hitro_set_variant_random_direction( UNUR_PAR *parameters );
0778 int unur_hitro_set_use_adaptiveline( UNUR_PAR *parameters, int adaptive );
0779 int unur_hitro_set_use_boundingrectangle( UNUR_PAR *parameters, int rectangle );
0780 int unur_hitro_set_use_adaptiverectangle( UNUR_PAR *parameters, int adaptive );
0781 int unur_hitro_set_r( UNUR_PAR *parameters, double r );
0782 int unur_hitro_set_v( UNUR_PAR *parameters, double vmax );
0783 int unur_hitro_set_u( UNUR_PAR *parameters, const double *umin, const double *umax );
0784 int unur_hitro_set_adaptive_multiplier( UNUR_PAR *parameters, double factor );
0785 int unur_hitro_set_startingpoint( UNUR_PAR *parameters, const double *x0 );
0786 int unur_hitro_set_thinning( UNUR_PAR *parameters, int thinning );
0787 int unur_hitro_set_burnin( UNUR_PAR *parameters, int burnin );
0788 const double *unur_hitro_get_state( UNUR_GEN *generator );
0789 int unur_hitro_chg_state( UNUR_GEN *generator, const double *state );
0790 int unur_hitro_reset_state( UNUR_GEN *generator );
0791
0792
0793
0794
0795 #define UNUR_STDGEN_DEFAULT 0
0796 #define UNUR_STDGEN_INVERSION (~0u)
0797 #define UNUR_STDGEN_FAST (0)
0798 UNUR_PAR *unur_cstd_new( const UNUR_DISTR *distribution );
0799 int unur_cstd_set_variant( UNUR_PAR *parameters, unsigned variant );
0800 int unur_cstd_chg_truncated( UNUR_GEN *generator, double left, double right );
0801 double unur_cstd_eval_invcdf( const UNUR_GEN *generator, double u );
0802
0803
0804
0805
0806 UNUR_PAR *unur_dstd_new( const UNUR_DISTR *distribution );
0807 int unur_dstd_set_variant( UNUR_PAR *parameters, unsigned variant );
0808 int unur_dstd_chg_truncated( UNUR_GEN *generator, int left, int right );
0809 int unur_dstd_eval_invcdf( const UNUR_GEN *generator, double u );
0810
0811
0812
0813
0814 UNUR_PAR *unur_mvstd_new( const UNUR_DISTR *distribution );
0815
0816
0817
0818
0819 UNUR_PAR *unur_mixt_new( int n, const double *prob, UNUR_GEN **comp );
0820 int unur_mixt_set_useinversion( UNUR_PAR *parameters, int useinv );
0821 double unur_mixt_eval_invcdf( const UNUR_GEN *generator, double u );
0822
0823
0824
0825
0826 UNUR_PAR *unur_cext_new( const UNUR_DISTR *distribution );
0827 int unur_cext_set_init( UNUR_PAR *parameters, int (*init)(UNUR_GEN *gen) );
0828 int unur_cext_set_sample( UNUR_PAR *parameters, double (*sample)(UNUR_GEN *gen) );
0829 void *unur_cext_get_params( UNUR_GEN *generator, size_t size );
0830 double *unur_cext_get_distrparams( UNUR_GEN *generator );
0831 int unur_cext_get_ndistrparams( UNUR_GEN *generator );
0832
0833
0834
0835
0836 UNUR_PAR *unur_dext_new( const UNUR_DISTR *distribution );
0837 int unur_dext_set_init( UNUR_PAR *parameters, int (*init)(UNUR_GEN *gen) );
0838 int unur_dext_set_sample( UNUR_PAR *parameters, int (*sample)(UNUR_GEN *gen) );
0839 void *unur_dext_get_params( UNUR_GEN *generator, size_t size );
0840 double *unur_dext_get_distrparams( UNUR_GEN *generator );
0841 int unur_dext_get_ndistrparams( UNUR_GEN *generator );
0842
0843
0844
0845
0846 UNUR_PAR *unur_unif_new( const UNUR_DISTR *dummy );
0847
0848
0849
0850
0851 #ifndef UNUR_DEPRECATED_DISTR_H_SEEN
0852 #define UNUR_DEPRECATED_DISTR_H_SEEN
0853 int unur_distr_cvec_set_stdmarginals( UNUR_DISTR *distribution, UNUR_DISTR *marginal );
0854 int unur_distr_cvec_set_stdmarginal_array( UNUR_DISTR *distribution, UNUR_DISTR **marginals );
0855 int unur_distr_cvec_set_stdmarginal_list( UNUR_DISTR *distribution, ... );
0856 const UNUR_DISTR *unur_distr_cvec_get_stdmarginal( const UNUR_DISTR *distribution, int n );
0857 #endif
0858
0859
0860
0861
0862 #ifndef UNUR_DEPRECATED_METHODS_H_SEEN
0863 #define UNUR_DEPRECATED_METHODS_H_SEEN
0864 int unur_cstd_chg_pdfparams( UNUR_GEN *generator, double *params, int n_params );
0865 int unur_dari_reinit( UNUR_GEN *generator );
0866 int unur_dari_chg_pmfparams( UNUR_GEN *generator, double *params, int n_params );
0867 int unur_dari_chg_domain( UNUR_GEN *generator, int left, int right );
0868 int unur_dari_chg_mode( UNUR_GEN *generator, int mode );
0869 int unur_dari_upd_mode( UNUR_GEN *generator );
0870 int unur_dari_chg_pmfsum( UNUR_GEN *generator, double sum );
0871 int unur_dari_upd_pmfsum( UNUR_GEN *generator );
0872 int unur_dsrou_reinit( UNUR_GEN *generator );
0873 int unur_dsrou_chg_pmfparams( UNUR_GEN *generator, double *params, int n_params );
0874 int unur_dsrou_chg_domain( UNUR_GEN *generator, int left, int right );
0875 int unur_dsrou_chg_mode( UNUR_GEN *generator, int mode );
0876 int unur_dsrou_upd_mode( UNUR_GEN *generator );
0877 int unur_dsrou_chg_pmfsum( UNUR_GEN *generator, double sum );
0878 int unur_dsrou_upd_pmfsum( UNUR_GEN *generator );
0879 int unur_dstd_chg_pmfparams( UNUR_GEN *gen, double *params, int n_params );
0880 int unur_ninv_chg_pdfparams(UNUR_GEN *generator, double *params, int n_params);
0881 int unur_srou_reinit( UNUR_GEN *generator );
0882 int unur_srou_chg_pdfparams( UNUR_GEN *generator, double *params, int n_params );
0883 int unur_srou_chg_domain( UNUR_GEN *generator, double left, double right );
0884 int unur_srou_chg_mode( UNUR_GEN *generator, double mode );
0885 int unur_srou_upd_mode( UNUR_GEN *generator );
0886 int unur_srou_chg_pdfarea( UNUR_GEN *generator, double area );
0887 int unur_srou_upd_pdfarea( UNUR_GEN *generator );
0888 int unur_ssr_reinit( UNUR_GEN *generator );
0889 int unur_ssr_chg_pdfparams( UNUR_GEN *generator, double *params, int n_params );
0890 int unur_ssr_chg_domain( UNUR_GEN *generator, double left, double right );
0891 int unur_ssr_chg_mode( UNUR_GEN *generator, double mode );
0892 int unur_ssr_upd_mode( UNUR_GEN *generator );
0893 int unur_ssr_chg_pdfarea( UNUR_GEN *generator, double area );
0894 int unur_ssr_upd_pdfarea( UNUR_GEN *generator );
0895 int unur_tdr_reinit( UNUR_GEN *generator );
0896 int unur_tdrgw_reinit( UNUR_GEN *generator );
0897 int unur_utdr_reinit( UNUR_GEN *generator );
0898 int unur_utdr_chg_pdfparams( UNUR_GEN *generator, double *params, int n_params );
0899 int unur_utdr_chg_domain( UNUR_GEN *generator, double left, double right );
0900 int unur_utdr_chg_mode( UNUR_GEN *generator, double mode );
0901 int unur_utdr_upd_mode( UNUR_GEN *generator );
0902 int unur_utdr_chg_pdfarea( UNUR_GEN *generator, double area );
0903 int unur_utdr_upd_pdfarea( UNUR_GEN *generator );
0904 #endif
0905
0906
0907
0908
0909 #define unur_tdrgw_new( distr ) \
0910 (unur_ars_new( distr ))
0911 #define unur_tdrgw_set_max_intervals( par,max_ivs ) \
0912 (unur_ars_set_max_intervals( (par),(max_ivs) ))
0913 #define unur_tdrgw_set_cpoints( par,n_cpoints,cpoints ) \
0914 (unur_ars_set_cpoints( (par),(n_cpoints),(cpoints) ))
0915 #define unur_tdrgw_set_reinit_percentiles( par,n_percentiles,percentiles ) \
0916 (unur_ars_set_reinit_percentiles( (par),(n_percentiles),(percentiles) ))
0917 #define unur_tdrgw_chg_reinit_percentiles( gen,n_percentiles,percentiles ) \
0918 (unur_ars_chg_reinit_percentiles( (gen),(n_percentiles),(percentiles) ))
0919 #define unur_tdrgw_set_reinit_ncpoints( par,ncpoints ) \
0920 (unur_ars_set_reinit_ncpoints( (par),(ncpoints) ))
0921 #define unur_tdrgw_chg_reinit_ncpoints( gen,ncpoints ) \
0922 (unur_ars_chg_reinit_ncpoints( (gen),(ncpoints) ))
0923 #define unur_tdrgw_set_verify( par,verify ) \
0924 (unur_ars_set_verify( (par),(verify) ))
0925 #define unur_tdrgw_chg_verify( gen,verify ) \
0926 (unur_ars_chg_verify( (gen),(verify) ))
0927 #define unur_tdrgw_set_pedantic( par,pedantic ) \
0928 (unur_ars_set_pedantic( (par),(pedantic) ))
0929 #define unur_tdrgw_get_loghatarea( gen ) \
0930 (unur_ars_get_loghatarea( gen ))
0931 #define unur_tdrgw_eval_invcdfhat( gen,u ) \
0932 (unur_ars_eval_invcdfhat( (gen),(u) ))
0933
0934
0935
0936
0937 UNUR_PAR *unur_vmt_new( const UNUR_DISTR *distribution );
0938
0939
0940
0941
0942 UNUR_GEN *unur_str2gen( const char *string );
0943 UNUR_DISTR *unur_str2distr( const char *string );
0944 UNUR_GEN *unur_makegen_ssu( const char *distrstr, const char *methodstr, UNUR_URNG *urng );
0945 UNUR_GEN *unur_makegen_dsu( const UNUR_DISTR *distribution, const char *methodstr, UNUR_URNG *urng );
0946 UNUR_PAR *_unur_str2par( const UNUR_DISTR *distribution, const char *method, struct unur_slist **mlist );
0947
0948
0949
0950
0951 UNUR_GEN *unur_init( UNUR_PAR *parameters );
0952 int unur_reinit( UNUR_GEN *generator );
0953 int unur_sample_discr(UNUR_GEN *generator);
0954 double unur_sample_cont(UNUR_GEN *generator);
0955 int unur_sample_vec(UNUR_GEN *generator, double *vector);
0956 int unur_sample_matr(UNUR_GEN *generator, double *matrix);
0957 double unur_quantile ( UNUR_GEN *generator, double U );
0958 void unur_free( UNUR_GEN *generator );
0959 const char *unur_gen_info( UNUR_GEN *generator, int help );
0960 int unur_get_dimension( const UNUR_GEN *generator );
0961 const char *unur_get_genid( const UNUR_GEN *generator );
0962 UNUR_DISTR *unur_get_distr( const UNUR_GEN *generator );
0963 int unur_set_use_distr_privatecopy( UNUR_PAR *parameters, int use_privatecopy );
0964 UNUR_GEN *unur_gen_clone( const UNUR_GEN *gen );
0965 void unur_par_free( UNUR_PAR *par);
0966
0967
0968
0969
0970 #ifndef UNURAN_DISTRIBUTIONS_H_SEEN
0971 #define UNURAN_DISTRIBUTIONS_H_SEEN
0972
0973
0974 #ifndef UNUR_STDDISTR_H_SEEN
0975 #define UNUR_STDDISTR_H_SEEN
0976 #define UNUR_DISTR_STD (0x00000001u)
0977 enum {
0978 UNUR_DISTR_GENERIC = 0x00000000u,
0979 UNUR_DISTR_CORDER = 0x00000010u,
0980 UNUR_DISTR_CXTRANS = 0x00000020u,
0981 UNUR_DISTR_CONDI = 0x00000030u,
0982 UNUR_DISTR_BETA = 0x00000101u,
0983 UNUR_DISTR_CAUCHY = 0x00000201u,
0984 UNUR_DISTR_CHI = 0x00000301u,
0985 UNUR_DISTR_CHISQUARE = 0x00000401u,
0986 UNUR_DISTR_EPANECHNIKOV = 0x00000501u,
0987 UNUR_DISTR_EXPONENTIAL = 0x00000601u,
0988 UNUR_DISTR_EXTREME_I = 0x00000701u,
0989 UNUR_DISTR_EXTREME_II = 0x00000801u,
0990 UNUR_DISTR_F = 0x00000901u,
0991 UNUR_DISTR_GAMMA = 0x00000a01u,
0992 UNUR_DISTR_GHYP = 0x00002401u,
0993 UNUR_DISTR_GIG = 0x00000b01u,
0994 UNUR_DISTR_GIG2 = 0x00002201u,
0995 UNUR_DISTR_HYPERBOLIC = 0x00002301u,
0996 UNUR_DISTR_IG = 0x00002101u,
0997 UNUR_DISTR_LAPLACE = 0x00000c01u,
0998 UNUR_DISTR_LOGISTIC = 0x00000d01u,
0999 UNUR_DISTR_LOGNORMAL = 0x00000e01u,
1000 UNUR_DISTR_LOMAX = 0x00000f01u,
1001 UNUR_DISTR_NORMAL = 0x00001001u,
1002 UNUR_DISTR_GAUSSIAN = 0x00001001u,
1003 UNUR_DISTR_PARETO = 0x00001101u,
1004 UNUR_DISTR_POWEREXPONENTIAL = 0x00001201u,
1005 UNUR_DISTR_RAYLEIGH = 0x00001301u,
1006 UNUR_DISTR_SLASH = 0x00001401u,
1007 UNUR_DISTR_STUDENT = 0x00001501u,
1008 UNUR_DISTR_TRIANGULAR = 0x00001601u,
1009 UNUR_DISTR_UNIFORM = 0x00002001u,
1010 UNUR_DISTR_BOXCAR = 0x00002001u,
1011 UNUR_DISTR_WEIBULL = 0x00001801u,
1012 UNUR_DISTR_BURR_I = 0x0000b001u,
1013 UNUR_DISTR_BURR_II = 0x0000b101u,
1014 UNUR_DISTR_BURR_III = 0x0000b201u,
1015 UNUR_DISTR_BURR_IV = 0x0000b301u,
1016 UNUR_DISTR_BURR_V = 0x0000b401u,
1017 UNUR_DISTR_BURR_VI = 0x0000b501u,
1018 UNUR_DISTR_BURR_VII = 0x0000b601u,
1019 UNUR_DISTR_BURR_VIII = 0x0000b701u,
1020 UNUR_DISTR_BURR_IX = 0x0000b801u,
1021 UNUR_DISTR_BURR_X = 0x0000b901u,
1022 UNUR_DISTR_BURR_XI = 0x0000ba01u,
1023 UNUR_DISTR_BURR_XII = 0x0000bb01u,
1024 UNUR_DISTR_BINOMIAL = 0x00010001u,
1025 UNUR_DISTR_GEOMETRIC = 0x00020001u,
1026 UNUR_DISTR_HYPERGEOMETRIC = 0x00030001u,
1027 UNUR_DISTR_LOGARITHMIC = 0x00040001u,
1028 UNUR_DISTR_NEGATIVEBINOMIAL = 0x00050001u,
1029 UNUR_DISTR_POISSON = 0x00060001u,
1030 UNUR_DISTR_ZIPF = 0x00070001u,
1031 UNUR_DISTR_MCAUCHY = 0x01000001u,
1032 UNUR_DISTR_MNORMAL = 0x02000001u,
1033 UNUR_DISTR_MSTUDENT = 0x03000001u,
1034 UNUR_DISTR_MEXPONENTIAL = 0x04000001u,
1035 UNUR_DISTR_COPULA = 0x05000001u,
1036 UNUR_DISTR_MCORRELATION = 0x10000001u
1037 };
1038 #endif
1039
1040
1041 UNUR_DISTR *unur_distr_beta(const double *params, int n_params);
1042 UNUR_DISTR *unur_distr_burr(const double *params, int n_params);
1043 UNUR_DISTR *unur_distr_cauchy(const double *params, int n_params);
1044 UNUR_DISTR *unur_distr_chi(const double *params, int n_params);
1045 UNUR_DISTR *unur_distr_chisquare(const double *params, int n_params);
1046 UNUR_DISTR *unur_distr_exponential(const double *params, int n_params);
1047 UNUR_DISTR *unur_distr_extremeI(const double *params, int n_params);
1048 UNUR_DISTR *unur_distr_extremeII(const double *params, int n_params);
1049 UNUR_DISTR *unur_distr_F(const double *params, int n_params);
1050 UNUR_DISTR *unur_distr_gamma(const double *params, int n_params);
1051 UNUR_DISTR *unur_distr_ghyp(const double *params, int n_params);
1052 UNUR_DISTR *unur_distr_gig(const double *params, int n_params);
1053 UNUR_DISTR *unur_distr_gig2(const double *params, int n_params);
1054 UNUR_DISTR *unur_distr_hyperbolic(const double *params, int n_params);
1055 UNUR_DISTR *unur_distr_ig(const double *params, int n_params);
1056 UNUR_DISTR *unur_distr_laplace(const double *params, int n_params);
1057 UNUR_DISTR *unur_distr_logistic(const double *params, int n_params);
1058 UNUR_DISTR *unur_distr_lognormal(const double *params, int n_params);
1059 UNUR_DISTR *unur_distr_lomax(const double *params, int n_params);
1060 UNUR_DISTR *unur_distr_normal( const double *params, int n_params );
1061 UNUR_DISTR *unur_distr_pareto( const double *params, int n_params );
1062 UNUR_DISTR *unur_distr_powerexponential(const double *params, int n_params);
1063 UNUR_DISTR *unur_distr_rayleigh(const double *params, int n_params);
1064 UNUR_DISTR *unur_distr_slash(const double *params, int n_params);
1065 UNUR_DISTR *unur_distr_student(const double *params, int n_params);
1066 UNUR_DISTR *unur_distr_triangular(const double *params, int n_params);
1067 UNUR_DISTR *unur_distr_uniform(const double *params, int n_params);
1068 UNUR_DISTR *unur_distr_weibull(const double *params, int n_params);
1069 UNUR_DISTR *unur_distr_multinormal(int dim, const double *mean, const double *covar);
1070 UNUR_DISTR *unur_distr_multicauchy(int dim, const double *mean, const double *covar);
1071 UNUR_DISTR *unur_distr_multistudent(int dim, double nu, const double *mean, const double *covar);
1072 UNUR_DISTR *unur_distr_multiexponential(int dim, const double *sigma, const double *theta);
1073 UNUR_DISTR *unur_distr_copula(int dim, const double *rankcorr);
1074 UNUR_DISTR *unur_distr_correlation( int n );
1075 UNUR_DISTR *unur_distr_binomial(const double *params, int n_params);
1076 UNUR_DISTR *unur_distr_geometric(const double *params, int n_params);
1077 UNUR_DISTR *unur_distr_hypergeometric(const double *params, int n_params);
1078 UNUR_DISTR *unur_distr_logarithmic(const double *params, int n_params);
1079 UNUR_DISTR *unur_distr_negativebinomial(const double *params, int n_params);
1080 UNUR_DISTR *unur_distr_poisson(const double *params, int n_params);
1081 UNUR_DISTR *unur_distr_zipf(const double *params, int n_params);
1082 #endif
1083
1084
1085
1086
1087 FILE *unur_set_stream( FILE *new_stream );
1088 FILE *unur_get_stream( void );
1089
1090
1091
1092
1093 #ifndef DEBUG_H_SEEN
1094 #define DEBUG_H_SEEN
1095 #define UNUR_DEBUG_OFF (0u)
1096 #define UNUR_DEBUG_ALL (~0u)
1097 #define UNUR_DEBUG_INIT 0x00000001u
1098 #define UNUR_DEBUG_SETUP 0x00000fffu
1099 #define UNUR_DEBUG_ADAPT 0x00fff000u
1100 #define UNUR_DEBUG_SAMPLE 0xff000000u
1101 int unur_set_debug( UNUR_PAR *parameters, unsigned debug );
1102 int unur_chg_debug( UNUR_GEN *generator, unsigned debug );
1103 int unur_set_default_debug( unsigned debug );
1104 #endif
1105
1106
1107
1108
1109 extern int unur_errno;
1110 int unur_get_errno ( void );
1111 void unur_reset_errno ( void );
1112 const char *unur_get_strerror ( const int errnocode );
1113 UNUR_ERROR_HANDLER *unur_set_error_handler( UNUR_ERROR_HANDLER *new_handler );
1114 UNUR_ERROR_HANDLER *unur_set_error_handler_off( void );
1115
1116
1117
1118
1119 #ifndef UNUR_ERRNO_H_SEEN
1120 #define UNUR_ERRNO_H_SEEN
1121 enum {
1122 UNUR_SUCCESS = 0x00,
1123 UNUR_FAILURE = 0x01,
1124 UNUR_ERR_DISTR_SET = 0x11,
1125 UNUR_ERR_DISTR_GET = 0x12,
1126 UNUR_ERR_DISTR_NPARAMS = 0x13,
1127 UNUR_ERR_DISTR_DOMAIN = 0x14,
1128 UNUR_ERR_DISTR_GEN = 0x15,
1129 UNUR_ERR_DISTR_REQUIRED = 0x16,
1130 UNUR_ERR_DISTR_UNKNOWN = 0x17,
1131 UNUR_ERR_DISTR_INVALID = 0x18,
1132 UNUR_ERR_DISTR_DATA = 0x19,
1133 UNUR_ERR_DISTR_PROP = 0x20,
1134 UNUR_ERR_PAR_SET = 0x21,
1135 UNUR_ERR_PAR_VARIANT = 0x22,
1136 UNUR_ERR_PAR_INVALID = 0x23,
1137 UNUR_ERR_GEN = 0x31,
1138 UNUR_ERR_GEN_DATA = 0x32,
1139 UNUR_ERR_GEN_CONDITION = 0x33,
1140 UNUR_ERR_GEN_INVALID = 0x34,
1141 UNUR_ERR_GEN_SAMPLING = 0x35,
1142 UNUR_ERR_NO_REINIT = 0x36,
1143 UNUR_ERR_NO_QUANTILE = 0x37,
1144 UNUR_ERR_URNG = 0x41,
1145 UNUR_ERR_URNG_MISS = 0x42,
1146 UNUR_ERR_STR = 0x51,
1147 UNUR_ERR_STR_UNKNOWN = 0x52,
1148 UNUR_ERR_STR_SYNTAX = 0x53,
1149 UNUR_ERR_STR_INVALID = 0x54,
1150 UNUR_ERR_FSTR_SYNTAX = 0x55,
1151 UNUR_ERR_FSTR_DERIV = 0x56,
1152 UNUR_ERR_DOMAIN = 0x61,
1153 UNUR_ERR_ROUNDOFF = 0x62,
1154 UNUR_ERR_MALLOC = 0x63,
1155 UNUR_ERR_NULL = 0x64,
1156 UNUR_ERR_COOKIE = 0x65,
1157 UNUR_ERR_GENERIC = 0x66,
1158 UNUR_ERR_SILENT = 0x67,
1159 UNUR_ERR_INF = 0x68,
1160 UNUR_ERR_NAN = 0x69,
1161 UNUR_ERR_COMPILE = 0xa0,
1162 UNUR_ERR_SHOULD_NOT_HAPPEN = 0xf0
1163 };
1164 #endif
1165
1166
1167
1168
1169 #ifndef MATH_H_SEEN
1170 #define MATH_H_SEEN
1171
1172 #include <math.h>
1173
1174 #ifndef INFINITY
1175 # ifdef HUGE_VAL
1176 # define INFINITY (HUGE_VAL)
1177 # else
1178 extern const double INFINITY;
1179 # endif
1180 #endif
1181 #define UNUR_INFINITY (INFINITY)
1182 #ifndef TRUE
1183 #define TRUE (1)
1184 #endif
1185 #ifndef FALSE
1186 #define FALSE (0)
1187 #endif
1188 #endif
1189
1190
1191
1192
1193 #ifndef SLIST_H_SEEN
1194 #define SLIST_H_SEEN
1195 struct unur_slist *_unur_slist_new( void );
1196 int _unur_slist_append( struct unur_slist *slist, void *element );
1197 int _unur_slist_length( const struct unur_slist *slist );
1198 void *_unur_slist_get( const struct unur_slist *slist, int n );
1199 void *_unur_slist_replace( struct unur_slist *slist, int n, void *element );
1200 void _unur_slist_free( struct unur_slist *slist );
1201 #endif
1202
1203
1204 #ifndef TRUE
1205 #define TRUE (1)
1206 #endif
1207 #ifndef FALSE
1208 #define FALSE (0)
1209 #endif
1210 #endif
1211 __END_DECLS