ARTS  2.2.66
rng.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2012 Cory Davis <cory@met.ed.ac.uk>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA. */
17 
18 /*===========================================================================
19  === File description
20  ===========================================================================*/
21 
42 /* gsl_types.h
43  *
44  * Copyright (C) 2001 Brian Gough
45  *
46  * This program is free software; you can redistribute it and/or modify
47  * it under the terms of the GNU General Public License as published by
48  * the Free Software Foundation; either version 2 of the License, or (at
49  * your option) any later version.
50  *
51  * This program is distributed in the hope that it will be useful, but
52  * WITHOUT ANY WARRANTY; without even the implied warranty of
53  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
54  * General Public License for more details.
55  *
56  * You should have received a copy of the GNU General Public License
57  * along with this program; if not, write to the Free Software
58  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
59  */
60 #ifndef rng_h
61 #define rng_h
62 
63 #include "messages.h"
64 #ifndef __GSL_TYPES_H__
65 #define __GSL_TYPES_H__
66 
67 #ifndef GSL_VAR
68 
69 #ifdef WIN32
70 # ifdef _DLL
71 # ifdef DLL_EXPORT
72 # define GSL_VAR __declspec(dllexport)
73 # else
74 # define GSL_VAR __declspec(dllimport)
75 # endif
76 # else
77 # define GSL_VAR extern
78 # endif
79 #else
80 # define GSL_VAR extern
81 #endif
82 
83 #endif
84 
85 #endif /* __GSL_TYPES_H__ */
86 
87 
88 
89 
90 /* rng/gsl_rng.h
91  *
92  * Copyright (C) 1996, 1997, 1998, 1999, 2000 James Theiler, Brian Gough
93  *
94  * This program is free software; you can redistribute it and/or modify
95  * it under the terms of the GNU General Public License as published by
96  * the Free Software Foundation; either version 2 of the License, or (at
97  * your option) any later version.
98  *
99  * This program is distributed in the hope that it will be useful, but
100  * WITHOUT ANY WARRANTY; without even the implied warranty of
101  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
102  * General Public License for more details.
103  *
104  * You should have received a copy of the GNU General Public License
105  * along with this program; if not, write to the Free Software
106  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
107  */
108 
109 #ifndef __GSL_RNG_H__
110 #define __GSL_RNG_H__
111 #include <cstdlib>
112 
113 #undef __BEGIN_DECLS
114 #undef __END_DECLS
115 #ifdef __cplusplus
116 # define __BEGIN_DECLS extern "C" {
117 # define __END_DECLS }
118 #else
119 # define __BEGIN_DECLS /* empty */
120 # define __END_DECLS /* empty */
121 #endif
122 
124 
125 typedef struct
126  {
127  const char *name;
128  unsigned long int max;
129  unsigned long int min;
130  size_t size;
131  void (*set) (void *state, unsigned long int seed);
132  unsigned long int (*get) (void *state);
133  double (*get_double) (void *state);
134  }
136 
137 typedef struct
138  {
140  void *state;
141  }
142 gsl_rng;
143 
144 
145 /* These structs also need to appear in default.c so you can select
146  them via the environment variable GSL_RNG_TYPE */
147 
209 
210 const gsl_rng_type ** gsl_rng_types_setup(void);
211 
213 GSL_VAR unsigned long int gsl_rng_default_seed;
214 
215 gsl_rng *gsl_rng_alloc (const gsl_rng_type * T);
216 int gsl_rng_memcpy (gsl_rng * dest, const gsl_rng * src);
217 gsl_rng *gsl_rng_clone (const gsl_rng * r);
218 
219 void gsl_rng_free (gsl_rng * r);
220 
221 void gsl_rng_set (const gsl_rng * r, unsigned long int seed);
222 unsigned long int gsl_rng_max (const gsl_rng * r);
223 unsigned long int gsl_rng_min (const gsl_rng * r);
224 const char *gsl_rng_name (const gsl_rng * r);
225 size_t gsl_rng_size (const gsl_rng * r);
226 void * gsl_rng_state (const gsl_rng * r);
227 
228 void gsl_rng_print_state (const gsl_rng * r);
229 
230 const gsl_rng_type * gsl_rng_env_setup (void);
231 
232 unsigned long int gsl_rng_get (const gsl_rng * r);
233 double gsl_rng_uniform (const gsl_rng * r);
234 double gsl_rng_uniform_pos (const gsl_rng * r);
235 unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n);
236 
237 
238 #ifdef HAVE_INLINE
239 extern inline unsigned long int gsl_rng_get (const gsl_rng * r);
240 
241 extern inline unsigned long int
242 gsl_rng_get (const gsl_rng * r)
243 {
244  return (r->type->get) (r->state);
245 }
246 
247 extern inline double gsl_rng_uniform (const gsl_rng * r);
248 
249 extern inline double
250 gsl_rng_uniform (const gsl_rng * r)
251 {
252  return (r->type->get_double) (r->state);
253 }
254 
255 extern inline double gsl_rng_uniform_pos (const gsl_rng * r);
256 
257 extern inline double
258 gsl_rng_uniform_pos (const gsl_rng * r)
259 {
260  double x ;
261  do
262  {
263  x = (r->type->get_double) (r->state) ;
264  }
265  while (x == 0) ;
266 
267  return x ;
268 }
269 
270 extern inline unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n);
271 
272 extern inline unsigned long int
273 gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n)
274 {
275  unsigned long int offset = r->type->min;
276  unsigned long int range = r->type->max - offset;
277  unsigned long int scale = range / n;
278  unsigned long int k;
279 
280  if (n > range)
281  {
282  GSL_ERROR_VAL ("n exceeds maximum value of generator",
283  GSL_EINVAL, 0) ;
284  }
285 
286  do
287  {
288  k = (((r->type->get) (r->state)) - offset) / scale;
289  }
290  while (k >= n);
291 
292  return k;
293 }
294 #endif /* HAVE_INLINE */
295 
297 
298 #endif /* __GSL_RNG_H__ */
299 
300 /* err/gsl_errno.h
301  *
302  * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, Brian Gough
303  *
304  * This program is free software; you can redistribute it and/or modify
305  * it under the terms of the GNU General Public License as published by
306  * the Free Software Foundation; either version 2 of the License, or (at
307  * your option) any later version.
308  *
309  * This program is distributed in the hope that it will be useful, but
310  * WITHOUT ANY WARRANTY; without even the implied warranty of
311  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
312  * General Public License for more details.
313  *
314  * You should have received a copy of the GNU General Public License
315  * along with this program; if not, write to the Free Software
316  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
317  */
318 
319 #ifndef __GSL_ERRNO_H__
320 #define __GSL_ERRNO_H__
321 
322 #include <cstdio>
323 #include <cerrno>
324 
325 #undef __BEGIN_DECLS
326 #undef __END_DECLS
327 #ifdef __cplusplus
328 # define __BEGIN_DECLS extern "C" {
329 # define __END_DECLS }
330 #else
331 # define __BEGIN_DECLS /* empty */
332 # define __END_DECLS /* empty */
333 #endif
334 
336 
337 enum {
340  GSL_CONTINUE = -2, /* iteration has not converged */
341  GSL_EDOM = 1, /* input domain error, e.g sqrt(-1) */
342  GSL_ERANGE = 2, /* output range error, e.g. exp(1e100) */
343  GSL_EFAULT = 3, /* invalid pointer */
344  GSL_EINVAL = 4, /* invalid argument supplied by user */
345  GSL_EFAILED = 5, /* generic failure */
346  GSL_EFACTOR = 6, /* factorization failed */
347  GSL_ESANITY = 7, /* sanity check failed - shouldn't happen */
348  GSL_ENOMEM = 8, /* malloc failed */
349  GSL_EBADFUNC = 9, /* problem with user-supplied function */
350  GSL_ERUNAWAY = 10, /* iterative process is out of control */
351  GSL_EMAXITER = 11, /* exceeded max number of iterations */
352  GSL_EZERODIV = 12, /* tried to divide by zero */
353  GSL_EBADTOL = 13, /* user specified an invalid tolerance */
354  GSL_ETOL = 14, /* failed to reach the specified tolerance */
355  GSL_EUNDRFLW = 15, /* underflow */
356  GSL_EOVRFLW = 16, /* overflow */
357  GSL_ELOSS = 17, /* loss of accuracy */
358  GSL_EROUND = 18, /* failed because of roundoff error */
359  GSL_EBADLEN = 19, /* matrix, vector lengths are not conformant */
360  GSL_ENOTSQR = 20, /* matrix not square */
361  GSL_ESING = 21, /* apparent singularity detected */
362  GSL_EDIVERGE = 22, /* integral or series is divergent */
363  GSL_EUNSUP = 23, /* requested feature is not supported by the hardware */
364  GSL_EUNIMPL = 24, /* requested feature not (yet) implemented */
365  GSL_ECACHE = 25, /* cache limit exceeded */
366  GSL_ETABLE = 26, /* table limit exceeded */
367  GSL_ENOPROG = 27, /* iteration is not making progress towards solution */
368  GSL_ENOPROGJ = 28, /* jacobian evaluations are not improving the solution */
369  GSL_ETOLF = 29, /* cannot reach the specified tolerance in F */
370  GSL_ETOLX = 30, /* cannot reach the specified tolerance in X */
371  GSL_ETOLG = 31, /* cannot reach the specified tolerance in gradient */
372  GSL_EOF = 32 /* end of file */
373 } ;
374 
375 void gsl_error (const char * reason, const char * file, int line,
376  int gsl_errno);
377 
378 void gsl_warning (const char * reason, const char * file, int line,
379  int gsl_errno) ;
380 
381 void gsl_stream_printf (const char *label, const char *file,
382  int line, const char *reason);
383 
384 const char * gsl_strerror (const int gsl_errno);
385 
386 typedef void gsl_error_handler_t (const char * reason, const char * file,
387  int line, int gsl_errno);
388 
389 typedef void gsl_stream_handler_t (const char * label, const char * file,
390  int line, const char * reason);
391 
394 
397 
400 
401 FILE * gsl_set_stream (FILE * new_stream);
402 
403 /* GSL_ERROR: call the error handler, and return the error code */
404 
405 #define GSL_ERROR(reason, gsl_errno) \
406  do { \
407  gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \
408  return gsl_errno ; \
409  } while (0)
410 
411 /* GSL_ERROR_VAL: call the error handler, and return the given value */
412 
413 #define GSL_ERROR_VAL(reason, gsl_errno, value) \
414  do { \
415  gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \
416  return value ; \
417  } while (0)
418 
419 /* GSL_ERROR_VOID: call the error handler, and then return
420  (for void functions which still need to generate an error) */
421 
422 #define GSL_ERROR_VOID(reason, gsl_errno) \
423  do { \
424  gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \
425  return ; \
426  } while (0)
427 
428 /* GSL_ERROR_NULL suitable for out-of-memory conditions */
429 
430 #define GSL_ERROR_NULL(reason, gsl_errno) GSL_ERROR_VAL(reason, gsl_errno, 0)
431 
432 
433 /* GSL library code can occasionally generate warnings, which are not
434  intended to be fatal. You can compile a version of the library with
435  warnings turned off globally by defining the preprocessor constant
436  GSL_WARNINGS_OFF. This turns off the warnings, but does not disable
437  error handling in any way or turn off error messages.
438 
439  GSL_WARNING() is not intended for use in client code -- use
440  GSL_MESSAGE() instead. */
441 
442 #ifdef GSL_WARNINGS_OFF /* throw away warnings */
443 #define GSL_WARNING(warning, gsl_errno) \
444  do { } while(0)
445 #else /* output all warnings */
446 #define GSL_WARNING(warning, gsl_errno) \
447  do { \
448  gsl_warning (warning, __FILE__, __LINE__, gsl_errno) ; \
449  } while (0)
450 #endif
451 
452 /* Warnings can also be turned off at runtime by setting the variable
453  gsl_warnings_off to a non-zero value */
454 
456 
457 
458 /* Sometimes you have several status results returned from
459  * function calls and you want to combine them in some sensible
460  * way. You cannot produce a "total" status condition, but you can
461  * pick one from a set of conditions based on an implied hierarchy.
462  *
463  * In other words:
464  * you have: status_a, status_b, ...
465  * you want: status = (status_a if it is bad, or status_b if it is bad,...)
466  *
467  * In this example you consider status_a to be more important and
468  * it is checked first, followed by the others in the order specified.
469  *
470  * Here are some dumb macros to do this.
471  */
472 #define GSL_ERROR_SELECT_2(a,b) ((a) != GSL_SUCCESS ? (a) : ((b) != GSL_SUCCESS ? (b) : GSL_SUCCESS))
473 #define GSL_ERROR_SELECT_3(a,b,c) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_2(b,c))
474 #define GSL_ERROR_SELECT_4(a,b,c,d) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_3(b,c,d))
475 #define GSL_ERROR_SELECT_5(a,b,c,d,e) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_4(b,c,d,e))
476 
477 #define GSL_STATUS_UPDATE(sp, s) do { if ((s) != GSL_SUCCESS) *(sp) = (s);} while(0)
478 
480 
481 #endif /* __GSL_ERRNO_H__ */
482 
483 /* err/gsl_message.h
484  *
485  * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, Brian Gough
486  *
487  * This program is free software; you can redistribute it and/or modify
488  * it under the terms of the GNU General Public License as published by
489  * the Free Software Foundation; either version 2 of the License, or (at
490  * your option) any later version.
491  *
492  * This program is distributed in the hope that it will be useful, but
493  * WITHOUT ANY WARRANTY; without even the implied warranty of
494  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
495  * General Public License for more details.
496  *
497  * You should have received a copy of the GNU General Public License
498  * along with this program; if not, write to the Free Software
499  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
500  */
501 
502 #ifndef __GSL_MESSAGE_H__
503 #define __GSL_MESSAGE_H__
504 
505 #undef __BEGIN_DECLS
506 #undef __END_DECLS
507 #ifdef __cplusplus
508 # define __BEGIN_DECLS extern "C" {
509 # define __END_DECLS }
510 #else
511 # define __BEGIN_DECLS /* empty */
512 # define __END_DECLS /* empty */
513 #endif
514 
516 
517 /* Provide a general messaging service for client use. Messages can
518  * be selectively turned off at compile time by defining an
519  * appropriate message mask. Client code which uses the GSL_MESSAGE()
520  * macro must provide a mask which is or'ed with the GSL_MESSAGE_MASK.
521  *
522  * The messaging service can be completely turned off
523  * by defining GSL_MESSAGING_OFF. */
524 
525 void gsl_message(const char * message, const char * file, int line,
526  unsigned int mask);
527 
528 #ifndef GSL_MESSAGE_MASK
529 #define GSL_MESSAGE_MASK 0xffffffffu /* default all messages allowed */
530 #endif
531 
532 GSL_VAR unsigned int gsl_message_mask ;
533 
534 /* Provide some symolic masks for client ease of use. */
535 
536 enum {
545 } ;
546 
547 #ifdef GSL_MESSAGING_OFF /* throw away messages */
548 #define GSL_MESSAGE(message, mask) do { } while(0)
549 #else /* output all messages */
550 #define GSL_MESSAGE(message, mask) \
551  do { \
552  if (mask & GSL_MESSAGE_MASK) \
553  gsl_message (message, __FILE__, __LINE__, mask) ; \
554  } while (0)
555 #endif
556 
558 
559 #endif /* __GSL_MESSAGE_H__ */
560 
562 
563 
564 /*CPD: 26-06-02. Here is my contribution to this file: a simple
565 random number generator class*/
566 
567 #include <ctime>
568 
569 class Rng {
570 
571  gsl_rng * r; //the gsl random number generator instance
572 
573  unsigned long int seed_no;//The integer used to seen the Rng
574 
575 
576  public:
577 
578  Rng(); //constructor
579 
580  ~Rng(); //destructor
581 
582  //The default is to seed the Rng using the seconds elapsed since
583  //1970.
584  void seed(unsigned long int n, const Verbosity& verbosity);
585 
586  void force_seed(unsigned long int n);
587 
588  double draw(); //draw a random number between [0,1)
589 
590  unsigned long int showseed() const; //return the seed.
591 };
592 
593 #endif /* rng_h */
GSL_VAR const gsl_rng_type * gsl_rng_taus
Definition: rng.h:199
void gsl_rng_print_state(const gsl_rng *r)
Definition: rng.cc:697
GSL_VAR const gsl_rng_type * gsl_rng_knuthran2
Definition: rng.h:156
GSL_VAR const gsl_rng_type * gsl_rng_gfsr4
Definition: rng.h:154
GSL_VAR const gsl_rng_type * gsl_rng_taus113
Definition: rng.h:201
const gsl_rng_type * type
Definition: rng.h:139
GSL_VAR const gsl_rng_type * gsl_rng_coveyou
Definition: rng.h:149
GSL_VAR const gsl_rng_type * gsl_rng_ranmar
Definition: rng.h:197
unsigned long int min
Definition: rng.h:129
Definition: rng.h:137
unsigned long int max
Definition: rng.h:128
Declarations having to do with the four output streams.
Definition: rng.h:372
GSL_VAR const gsl_rng_type * gsl_rng_ranlux
Definition: rng.h:190
FILE * gsl_set_stream(FILE *new_stream)
Definition: rng.cc:446
GSL_VAR const gsl_rng_type * gsl_rng_borosh13
Definition: rng.h:148
unsigned long int gsl_rng_min(const gsl_rng *r)
Definition: rng.cc:673
unsigned long int gsl_rng_max(const gsl_rng *r)
Definition: rng.cc:667
void force_seed(unsigned long int n)
Definition: rng.cc:110
GSL_VAR const gsl_rng_type * gsl_rng_random64_glibc2
Definition: rng.h:180
gsl_rng * gsl_rng_clone(const gsl_rng *r)
Definition: rng.cc:583
gsl_stream_handler_t * gsl_set_stream_handler(gsl_stream_handler_t *new_handler)
Definition: rng.cc:438
GSL_VAR const gsl_rng_type * gsl_rng_rand48
Definition: rng.h:169
GSL_VAR const gsl_rng_type * gsl_rng_ranlxs0
Definition: rng.h:194
GSL_VAR const gsl_rng_type * gsl_rng_mt19937_1999
Definition: rng.h:161
double gsl_rng_uniform(const gsl_rng *r)
Definition: rng.cc:624
const char * gsl_strerror(const int gsl_errno)
GSL_VAR const gsl_rng_type * gsl_rng_ran3
Definition: rng.h:167
GSL_VAR const gsl_rng_type * gsl_rng_mrg
Definition: rng.h:159
gsl_rng * gsl_rng_alloc(const gsl_rng_type *T)
Definition: rng.cc:541
GSL_VAR const gsl_rng_type * gsl_rng_random_glibc2
Definition: rng.h:186
GSL_VAR const gsl_rng_type * gsl_rng_random8_bsd
Definition: rng.h:182
GSL_VAR const gsl_rng_type * gsl_rng_default
Definition: rng.h:212
gsl_rng * r
Definition: rng.h:571
size_t size
Definition: rng.h:130
GSL_VAR const gsl_rng_type * gsl_rng_random32_libc5
Definition: rng.h:178
void gsl_error_handler_t(const char *reason, const char *file, int line, int gsl_errno)
Definition: rng.h:386
void gsl_error(const char *reason, const char *file, int line, int gsl_errno)
Definition: rng.cc:482
const char * gsl_rng_name(const gsl_rng *r)
Definition: rng.cc:679
GSL_VAR const gsl_rng_type * gsl_rng_random_libc5
Definition: rng.h:187
GSL_VAR const gsl_rng_type * gsl_rng_ran1
Definition: rng.h:165
Rng()
Definition: rng.cc:52
GSL_VAR const gsl_rng_type * gsl_rng_random256_libc5
Definition: rng.h:175
GSL_VAR const gsl_rng_type * gsl_rng_random128_bsd
Definition: rng.h:170
GSL_VAR const gsl_rng_type * gsl_rng_random32_glibc2
Definition: rng.h:177
GSL_VAR int gsl_warnings_off
Definition: rng.h:455
~Rng()
Definition: rng.cc:61
GSL_VAR const gsl_rng_type * gsl_rng_mt19937
Definition: rng.h:160
void * state
Definition: rng.h:140
const char * name
Definition: rng.h:127
GSL_VAR const gsl_rng_type * gsl_rng_random64_bsd
Definition: rng.h:179
GSL_VAR const gsl_rng_type * gsl_rng_ran0
Definition: rng.h:164
#define GSL_ERROR_VAL(reason, gsl_errno, value)
Definition: rng.h:413
GSL_VAR const gsl_rng_type * gsl_rng_uni
Definition: rng.h:204
GSL_VAR const gsl_rng_type * gsl_rng_minstd
Definition: rng.h:158
GSL_VAR const gsl_rng_type * gsl_rng_ranlxs2
Definition: rng.h:196
GSL_VAR const gsl_rng_type * gsl_rng_fishman2x
Definition: rng.h:153
void gsl_stream_handler_t(const char *label, const char *file, int line, const char *reason)
Definition: rng.h:389
GSL_VAR const gsl_rng_type * gsl_rng_transputer
Definition: rng.h:202
GSL_VAR const gsl_rng_type * gsl_rng_random128_glibc2
Definition: rng.h:171
#define __END_DECLS
Definition: rng.h:512
GSL_VAR const gsl_rng_type * gsl_rng_random256_bsd
Definition: rng.h:173
GSL_VAR const gsl_rng_type * gsl_rng_ranlxd1
Definition: rng.h:192
unsigned long int(* get)(void *state)
Definition: rng.h:132
GSL_VAR const gsl_rng_type * gsl_rng_random32_bsd
Definition: rng.h:176
GSL_VAR const gsl_rng_type * gsl_rng_taus2
Definition: rng.h:200
GSL_VAR const gsl_rng_type * gsl_rng_waterman14
Definition: rng.h:207
Definition: rng.h:354
Definition: rng.h:341
GSL_VAR const gsl_rng_type * gsl_rng_random256_glibc2
Definition: rng.h:174
GSL_VAR const gsl_rng_type * gsl_rng_random_bsd
Definition: rng.h:185
GSL_VAR const gsl_rng_type * gsl_rng_fishman20
Definition: rng.h:152
void gsl_stream_printf(const char *label, const char *file, int line, const char *reason)
Definition: rng.cc:421
GSL_VAR const gsl_rng_type * gsl_rng_ranlxs1
Definition: rng.h:195
GSL_VAR const gsl_rng_type * gsl_rng_zuf
Definition: rng.h:208
#define GSL_VAR
Definition: rng.h:80
GSL_VAR const gsl_rng_type * gsl_rng_slatec
Definition: rng.h:198
#define __BEGIN_DECLS
Definition: rng.h:511
void gsl_rng_free(gsl_rng *r)
Definition: rng.cc:712
void gsl_rng_set(const gsl_rng *r, unsigned long int seed)
Definition: rng.cc:611
GSL_VAR const gsl_rng_type * gsl_rng_knuthran
Definition: rng.h:155
size_t gsl_rng_size(const gsl_rng *r)
Definition: rng.cc:685
GSL_VAR const gsl_rng_type * gsl_rng_lecuyer21
Definition: rng.h:157
GSL_VAR const gsl_rng_type * gsl_rng_tt800
Definition: rng.h:203
Definition: rng.h:357
unsigned long int showseed() const
Definition: rng.cc:129
__BEGIN_DECLS void gsl_message(const char *message, const char *file, int line, unsigned int mask)
double draw()
Definition: rng.cc:120
Definition: rng.h:370
Definition: rng.h:371
GSL_VAR const gsl_rng_type * gsl_rng_r250
Definition: rng.h:163
GSL_VAR const gsl_rng_type * gsl_rng_random8_libc5
Definition: rng.h:184
Definition: rng.h:569
GSL_VAR const gsl_rng_type * gsl_rng_ranlux389
Definition: rng.h:191
double gsl_rng_uniform_pos(const gsl_rng *r)
Definition: rng.cc:630
const gsl_rng_type * gsl_rng_env_setup(void)
void gsl_warning(const char *reason, const char *file, int line, int gsl_errno)
double(* get_double)(void *state)
Definition: rng.h:133
const gsl_rng_type ** gsl_rng_types_setup(void)
Definition: rng.cc:328
int gsl_rng_memcpy(gsl_rng *dest, const gsl_rng *src)
Definition: rng.cc:570
GSL_VAR const gsl_rng_type * gsl_rng_uni32
Definition: rng.h:205
unsigned long int gsl_rng_uniform_int(const gsl_rng *r, unsigned long int n)
Definition: rng.cc:643
unsigned long int gsl_rng_get(const gsl_rng *r)
Definition: rng.cc:618
void seed(unsigned long int n, const Verbosity &verbosity)
Definition: rng.cc:72
GSL_VAR const gsl_rng_type * gsl_rng_rand
Definition: rng.h:168
GSL_VAR const gsl_rng_type * gsl_rng_ranlxd2
Definition: rng.h:193
gsl_error_handler_t * gsl_set_error_handler(gsl_error_handler_t *new_handler)
Definition: rng.cc:497
GSL_VAR const gsl_rng_type * gsl_rng_cmrg
Definition: rng.h:150
GSL_VAR const gsl_rng_type * gsl_rng_randu
Definition: rng.h:188
GSL_VAR const gsl_rng_type * gsl_rng_random8_glibc2
Definition: rng.h:183
unsigned long int seed_no
Definition: rng.h:573
GSL_VAR const gsl_rng_type * gsl_rng_vax
Definition: rng.h:206
GSL_VAR unsigned long int gsl_rng_default_seed
Definition: rng.h:213
GSL_VAR const gsl_rng_type * gsl_rng_ranf
Definition: rng.h:189
GSL_VAR const gsl_rng_type * gsl_rng_mt19937_1998
Definition: rng.h:162
gsl_error_handler_t * gsl_set_error_handler_off(void)
Definition: rng.cc:506
GSL_VAR const gsl_rng_type * gsl_rng_fishman18
Definition: rng.h:151
Definition: rng.h:369
Definition: rng.h:361
GSL_VAR const gsl_rng_type * gsl_rng_random128_libc5
Definition: rng.h:172
GSL_VAR const gsl_rng_type * gsl_rng_ran2
Definition: rng.h:166
void * gsl_rng_state(const gsl_rng *r)
Definition: rng.cc:691
GSL_VAR unsigned int gsl_message_mask
Definition: rng.h:532
GSL_VAR const gsl_rng_type * gsl_rng_random64_libc5
Definition: rng.h:181