Go to the documentation of this file.00001
00002
00003
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _GSL_RANDOM_GENERATOR_H
00033 #define _GSL_RANDOM_GENERATOR_H
00034
00035 # include <stdio.h>
00036 # include <stdlib.h>
00037 #include <gsl/gsl_rng.h>
00038 #include <string>
00039
00040 using std::string;
00041
00043
00044
00045 class random_generator
00046 {
00047
00048 private:
00049
00051
00052 gsl_rng* generator;
00053
00054 public:
00055
00057
00061
00062 random_generator (const random_generator& other);
00063
00065
00070
00071
00072 random_generator (const gsl_rng_type* type=NULL, unsigned long int seed=0);
00073
00075
00077
00078
00079 ~random_generator ();
00080
00082
00090
00091 void set(unsigned long int seed);
00092
00095
00101
00102
00103 unsigned long int get(unsigned long int n=0);
00104
00106
00112
00113
00114 double uniform();
00115
00117
00121
00122
00123 double uniform_positive();
00124
00126
00133
00134
00135 unsigned long int uniform_int(unsigned long int n) ;
00136
00140
00141 string name();
00142
00144
00145
00146 unsigned long int max();
00147
00149
00152
00153
00154 unsigned long int min();
00155
00156 };
00157
00158 #endif // GSL_RANDOM_GENERATOR_H
00159