Changeset 706 for trunk/yat/random
- Timestamp:
- Dec 19, 2006, 9:59:19 AM (17 years ago)
- Location:
- trunk/yat/random
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/random/random.cc
r680 r706 85 85 } 86 86 87 // --------------------- Discrete distribtuions --------------------- 88 89 Discrete::Discrete(void) 90 : rng_(RNG::instance()) 91 { 92 } 93 94 95 Discrete::~Discrete(void) 96 { 97 } 98 87 99 88 100 DiscreteGeneral::DiscreteGeneral(const statistics::Histogram& hist) … … 103 115 } 104 116 117 118 Poisson::Poisson(const double m) 119 : m_(m) 120 { 121 } 122 123 // --------------------- Continuous distribtuions --------------------- 124 125 Continuous::Continuous(void) 126 : rng_(RNG::instance()) 127 { 128 } 129 130 131 Continuous::~Continuous(void) 132 { 133 } 134 135 136 ContinuousGeneral::ContinuousGeneral(const statistics::Histogram& hist) 137 : discrete_(DiscreteGeneral(hist)), hist_(hist) 138 { 139 } 140 141 142 Exponential::Exponential(const double m) 143 : m_(m) 144 { 145 } 146 147 148 Gaussian::Gaussian(const double s, const double m) 149 : m_(m), s_(s) 150 { 151 } 152 105 153 }}} // of namespace random, yat, and theplu -
trunk/yat/random/random.h
r680 r706 193 193 /// @brief Constructor 194 194 /// 195 inline Discrete(void) { rng_=RNG::instance(); } 196 197 inline virtual ~Discrete(void) { } 195 Discrete(void); 196 197 /// 198 /// @brief The destructor 199 /// 200 virtual ~Discrete(void); 198 201 199 202 /// … … 338 341 /// 339 342 /// @param m is expectation value 340 inline Poisson(const double m=1) : m_(m) {} 343 /// 344 Poisson(const double m=1); 341 345 342 346 /// … … 373 377 /// @brief Constructor 374 378 /// 375 inline Continuous(void) { rng_=RNG::instance(); } 376 377 inline virtual ~Continuous(void) { } 379 Continuous(void); 380 381 /// 382 /// @brief The destructor 383 /// 384 virtual ~Continuous(void); 378 385 379 386 /// … … 434 441 /// @param hist is a Histogram defining the probability distribution 435 442 /// 436 inline ContinuousGeneral(const statistics::Histogram& hist) 437 : discrete_(DiscreteGeneral(hist)), hist_(hist) {} 438 439 /// 440 /// @brief Destructor 441 /// 442 ~ContinuousGeneral(void); 443 ContinuousGeneral(const statistics::Histogram& hist); 443 444 444 445 /// … … 475 476 /// @param m is the expectation value of the distribution. 476 477 /// 477 inline Exponential(const double m=1) : m_(m) {}478 inline Exponential(const double m=1); 478 479 479 480 /// … … 514 515 /// 515 516 /// @brief Constructor 517 /// 516 518 /// @param s is the standard deviation \f$ \sigma \f$ of distribution 517 519 /// @param m is the expectation value \f$ \mu \f$ of the distribution 518 520 /// 519 inline Gaussian(const double s=1, const double m=0) : m_(m), s_(s) {}521 Gaussian(const double s=1, const double m=0); 520 522 521 523 /// … … 528 530 /// @return A random Gaussian number with standard deviation \a s 529 531 /// and expectation value 0. 532 /// 530 533 /// @note this operator ignores parameters given in Constructor 531 534 /// … … 536 539 /// @return A random Gaussian number with standard deviation \a s 537 540 /// and expectation value \a m. 541 /// 538 542 /// @note this operator ignores parameters given in Constructor 539 543 ///
Note: See TracChangeset
for help on using the changeset viewer.