| 1 | /* Author: G. Jungman + modifications from O. Teytaud |
| 2 | */ |
| 3 | #ifndef __GSL_QRNG_H__ |
| 4 | #define __GSL_QRNG_H__cxx . . $ `qrng/gsl_qrng.h:4:9`! |
| 5 | |
| 6 | #include <stdlib.h> |
| 7 | #include <gsl/gsl_types.h>cxx . . $ `<file>/gsl_types.h`/ |
| 8 | #include <gsl/gsl_errno.h>cxx . . $ `<file>/err/gsl_errno.h`/ |
| 9 | #include <gsl/gsl_inline.h>cxx . . $ `<file>/gsl_inline.h`/ |
| 10 | |
| 11 | #undef __BEGIN_DECLScxx . . $ `err/gsl_errno.h:33:10`! |
| 12 | #undef __END_DECLScxx . . $ `err/gsl_errno.h:34:10`! |
| 13 | #ifdef __cplusplus |
| 14 | # define __BEGIN_DECLS extern "C" { |
| 15 | # define __END_DECLS } |
| 16 | #else |
| 17 | # define __BEGIN_DECLScxx . . $ `qrng/gsl_qrng.h:17:10`! /* empty */ |
| 18 | # define __END_DECLScxx . . $ `qrng/gsl_qrng.h:18:10`! /* empty */ |
| 19 | #endif |
| 20 | |
| 21 | __BEGIN_DECLScxx . . $ `qrng/gsl_qrng.h:17:10`! |
| 22 | |
| 23 | |
| 24 | /* Once again, more inane C-style OOP... kill me now. */ |
| 25 | |
| 26 | /* Structure describing a type of generator. |
| 27 | */ |
| 28 | typedef structcxx . . $ $anonymous_type_d033df18a0064c64_0# |
| 29 | { |
| 30 | const char * namecxx . . $ $anonymous_type_d033df18a0064c64_0#name.; |
| 31 | unsigned int max_dimensioncxx . . $ $anonymous_type_d033df18a0064c64_0#max_dimension.; |
| 32 | size_t (*state_sizecxx . . $ $anonymous_type_d033df18a0064c64_0#state_size.) (unsigned int dimension); |
| 33 | int (*init_statecxx . . $ $anonymous_type_d033df18a0064c64_0#init_state.) (void * state, unsigned int dimension); |
| 34 | int (*getcxx . . $ $anonymous_type_d033df18a0064c64_0#get.) (void * state, unsigned int dimension, double x[]); |
| 35 | } |
| 36 | gsl_qrng_typecxx . . $ gsl_qrng_type#; |
| 37 | |
| 38 | /* Structure describing a generator instance of a |
| 39 | * specified type, with generator-specific state info |
| 40 | * and dimension-specific info. |
| 41 | */ |
| 42 | typedef structcxx . . $ $anonymous_type_d033df18a0064c64_1# |
| 43 | { |
| 44 | const gsl_qrng_typecxx . . $ gsl_qrng_type# * typecxx . . $ $anonymous_type_d033df18a0064c64_1#type.; |
| 45 | unsigned int dimensioncxx . . $ $anonymous_type_d033df18a0064c64_1#dimension.; |
| 46 | size_t state_sizecxx . . $ $anonymous_type_d033df18a0064c64_1#state_size.; |
| 47 | void * statecxx . . $ $anonymous_type_d033df18a0064c64_1#state.; |
| 48 | } |
| 49 | gsl_qrngcxx . . $ gsl_qrng#; |
| 50 | |
| 51 | |
| 52 | /* Supported generator types. |
| 53 | */ |
| 54 | GSL_VARcxx . . $ `gsl_types.h:36:11`! const gsl_qrng_typecxx . . $ gsl_qrng_type# * gsl_qrng_niederreiter_2cxx . . $ gsl_qrng_niederreiter_2.; |
| 55 | GSL_VARcxx . . $ `gsl_types.h:36:11`! const gsl_qrng_typecxx . . $ gsl_qrng_type# * gsl_qrng_sobolcxx . . $ gsl_qrng_sobol.; |
| 56 | GSL_VARcxx . . $ `gsl_types.h:36:11`! const gsl_qrng_typecxx . . $ gsl_qrng_type# * gsl_qrng_haltoncxx . . $ gsl_qrng_halton.; |
| 57 | GSL_VARcxx . . $ `gsl_types.h:36:11`! const gsl_qrng_typecxx . . $ gsl_qrng_type# * gsl_qrng_reversehaltoncxx . . $ gsl_qrng_reversehalton.; |
| 58 | |
| 59 | |
| 60 | /* Allocate and initialize a generator |
| 61 | * of the specified type, in the given |
| 62 | * space dimension. |
| 63 | */ |
| 64 | gsl_qrngcxx . . $ gsl_qrng# * gsl_qrng_alloccxx . . $ gsl_qrng_alloc(af9f78a9b5fe42de). (const gsl_qrng_typecxx . . $ gsl_qrng_type# * T, unsigned int dimension); |
| 65 | |
| 66 | |
| 67 | /* Copy a generator. */ |
| 68 | int gsl_qrng_memcpycxx . . $ gsl_qrng_memcpy(edb5fd098e9382d7). (gsl_qrngcxx . . $ gsl_qrng# * dest, const gsl_qrngcxx . . $ gsl_qrng# * src); |
| 69 | |
| 70 | |
| 71 | /* Clone a generator. */ |
| 72 | gsl_qrngcxx . . $ gsl_qrng# * gsl_qrng_clonecxx . . $ gsl_qrng_clone(f87888c728be91d9). (const gsl_qrngcxx . . $ gsl_qrng# * q); |
| 73 | |
| 74 | |
| 75 | /* Free a generator. */ |
| 76 | void gsl_qrng_freecxx . . $ gsl_qrng_free(103b5603e39f15b4). (gsl_qrngcxx . . $ gsl_qrng# * q); |
| 77 | |
| 78 | |
| 79 | /* Intialize a generator. */ |
| 80 | void gsl_qrng_initcxx . . $ gsl_qrng_init(103b5603e39f15b4). (gsl_qrngcxx . . $ gsl_qrng# * q); |
| 81 | |
| 82 | |
| 83 | /* Get the standardized name of the generator. */ |
| 84 | const char * gsl_qrng_namecxx . . $ gsl_qrng_name(b78cabcc4803f475). (const gsl_qrngcxx . . $ gsl_qrng# * q); |
| 85 | |
| 86 | |
| 87 | /* ISN'T THIS CONFUSING FOR PEOPLE? |
| 88 | WHAT IF SOMEBODY TRIES TO COPY WITH THIS ??? |
| 89 | */ |
| 90 | size_t gsl_qrng_sizecxx . . $ gsl_qrng_size(8c7c38b81ddb7ae3). (const gsl_qrngcxx . . $ gsl_qrng# * q); |
| 91 | |
| 92 | |
| 93 | void * gsl_qrng_statecxx . . $ gsl_qrng_state(619b05e09edfe8c0). (const gsl_qrngcxx . . $ gsl_qrng# * q); |
| 94 | |
| 95 | |
| 96 | /* Retrieve next vector in sequence. */ |
| 97 | INLINE_DECLcxx . . $ `gsl_inline.h:51:13`! int gsl_qrng_getcxx . . $ gsl_qrng_get(6eca0c6bc9fa1511). (const gsl_qrngcxx . . $ gsl_qrng# * q, double x[]); |
| 98 | |
| 99 | #ifdef HAVE_INLINEcxx . . $ `config.h:98:9`! |
| 100 | INLINE_FUNcxx . . $ `gsl_inline.h:52:13`! int gsl_qrng_getcxx . . $ gsl_qrng_get(6eca0c6bc9fa1511). (const gsl_qrngcxx . . $ gsl_qrng# * q, double x[]) |
| 101 | { |
| 102 | return (q->typecxx . . $ $anonymous_type_d033df18a0064c64_1#type.->getcxx . . $ $anonymous_type_d033df18a0064c64_0#get.) (q->statecxx . . $ $anonymous_type_d033df18a0064c64_1#state., q->dimensioncxx . . $ $anonymous_type_d033df18a0064c64_1#dimension., x); |
| 103 | } |
| 104 | |
| 105 | #endif /* HAVE_INLINE */ |
| 106 | |
| 107 | |
| 108 | __END_DECLScxx . . $ `qrng/gsl_qrng.h:18:10`! |
| 109 | |
| 110 | |
| 111 | #endif /* !__GSL_QRNG_H__ */ |