Changeset 368
 Timestamp:
 Aug 5, 2005, 2:01:26 PM (18 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/random/Random.h
r367 r368 1 1 // $Id$ 2 2 3 3 #ifndef _theplu_random_ … … 44 44 /// Abstract base class for continuous random distributions. 45 45 /// 46 class RandomContinuous47 { 48 public: 49 50 /// 51 /// @brief Constructor 52 /// 53 inline RandomContinuous(void) { rng_=RNG::instance(89); }46 class Continuous 47 { 48 public: 49 50 /// 51 /// @brief Constructor 52 /// 53 inline Continuous(void) { rng_=RNG::instance(89); } 54 54 55 55 /// … … 73 73 /// Variance: \f$ \frac{1}{12} \f$ 74 74 /// 75 class RandomContinuousUniform : public RandomContinuous75 class ContinuousUniform : public Continuous 76 76 { 77 77 public: … … 94 94 /// Variance: \f$ \sigma^2 \f$ 95 95 /// 96 class RandomGaussian : public RandomContinuous96 class Gaussian : public Continuous 97 97 { 98 98 public: … … 102 102 /// m is the expectation value \f$ \mu \f$ of the distribution 103 103 /// 104 inline RandomGaussian(const double s=1, const double m=0)104 inline Gaussian(const double s=1, const double m=0) 105 105 : m_(m), s_(s) {} 106 106 … … 143 143 /// Variance: \f$ m^2 \f$ 144 144 /// 145 class RandomExponential : public RandomContinuous145 class Exponential : public Continuous 146 146 { 147 147 public: … … 150 150 /// @param m is the expectation value of the distribution. 151 151 /// 152 inline RandomExponential(const double m=1)152 inline Exponential(const double m=1) 153 153 : m_(m){} 154 154 … … 179 179 /// produce a random value k consistent with its probability. 180 180 /// 181 class RandomDiscrete182 { 183 public: 184 /// 185 /// @brief Constructor 186 /// 187 inline RandomDiscrete(void) { rng_=RNG::instance(89); }181 class Discrete 182 { 183 public: 184 /// 185 /// @brief Constructor 186 /// 187 inline Discrete(void) { rng_=RNG::instance(89); } 188 188 189 189 /// … … 209 209 /// 210 210 211 class RandomDiscreteUniform : public RandomDiscrete211 class DiscreteUniform : public Discrete 212 212 { 213 213 public: … … 219 219 /// can be generated \f$ (a) \f$ 220 220 /// 221 inline RandomDiscreteUniform(const u_long range, const long min=0)221 inline DiscreteUniform(const u_long range, const long min=0) 222 222 : min_(min), range_(range) {} 223 223 … … 263 263 /// Variance: \f$ m \f$ 264 264 /// 265 class RandomPoisson : public RandomDiscrete265 class Poisson : public Discrete 266 266 { 267 267 public: … … 270 270 /// 271 271 /// @param m is expectation value 272 inline RandomPoisson(const double m=1)272 inline Poisson(const double m=1) 273 273 : m_(m){} 274 274 275 275 /// 276 /// @return aPoisson distributed number.276 /// @return A Poisson distributed number. 277 277 /// 278 278 inline double operator()(void) const … … 280 280 281 281 /// 282 /// @return aPoisson distributed number with expectation value \a282 /// @return A Poisson distributed number with expectation value \a 283 283 /// m 284 284 /// @note this operator ignores parameters set in Constructor … … 293 293 /// @brief General 294 294 /// 295 class RandomDiscreteGeneral : public RandomDiscrete {295 class DiscreteGeneral : public Discrete { 296 296 }; 297 297
Note: See TracChangeset
for help on using the changeset viewer.