Changeset 368


Ignore:
Timestamp:
Aug 5, 2005, 2:01:26 PM (16 years ago)
Author:
Peter
Message:

removed random in class names. No need since they have a random namespace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/random/Random.h

    r367 r368  
    1  // $Id$
     1// $Id$
    22
    33#ifndef _theplu_random_
     
    4444  /// Abstract base class for continuous random distributions.
    4545  ///
    46   class RandomContinuous
    47   {
    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); }
    5454
    5555    ///
     
    7373  /// Variance: \f$ \frac{1}{12} \f$
    7474  ///
    75   class RandomContinuousUniform : public RandomContinuous
     75  class ContinuousUniform : public Continuous
    7676  {
    7777  public:
     
    9494  /// Variance: \f$ \sigma^2 \f$
    9595  ///
    96   class RandomGaussian : public RandomContinuous
     96  class Gaussian : public Continuous
    9797  {
    9898  public:
     
    102102    /// m is the expectation value \f$ \mu \f$ of the distribution
    103103    ///
    104     inline RandomGaussian(const double s=1, const double m=0)
     104    inline Gaussian(const double s=1, const double m=0)
    105105      : m_(m), s_(s) {}
    106106
     
    143143  /// Variance: \f$ m^2 \f$
    144144  ///
    145   class RandomExponential : public RandomContinuous
     145  class Exponential : public Continuous
    146146  {
    147147  public:
     
    150150    /// @param m is the expectation value of the distribution.
    151151    ///
    152     inline RandomExponential(const double m=1)
     152    inline Exponential(const double m=1)
    153153      : m_(m){}
    154154
     
    179179  /// produce a random value k consistent with its probability.
    180180  ///
    181   class RandomDiscrete
    182   {
    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); }
    188188
    189189    ///
     
    209209  ///
    210210
    211   class RandomDiscreteUniform : public RandomDiscrete
     211  class DiscreteUniform : public Discrete
    212212  {
    213213  public:
     
    219219    /// can be generated \f$ (a) \f$
    220220    ///
    221     inline RandomDiscreteUniform(const u_long range, const long min=0)
     221    inline DiscreteUniform(const u_long range, const long min=0)
    222222      : min_(min), range_(range) {}
    223223
     
    263263  /// Variance: \f$ m \f$
    264264  ///
    265   class RandomPoisson : public RandomDiscrete
     265  class Poisson : public Discrete
    266266  {
    267267  public:
     
    270270    ///
    271271    /// @param m is expectation value
    272     inline RandomPoisson(const double m=1)
     272    inline Poisson(const double m=1)
    273273      : m_(m){}
    274274
    275275    ///
    276     /// @return a Poisson distributed number.
     276    /// @return A Poisson distributed number.
    277277    ///
    278278    inline double operator()(void) const
     
    280280
    281281    ///
    282     /// @return a Poisson distributed number with expectation value \a
     282    /// @return A Poisson distributed number with expectation value \a
    283283    /// m
    284284    /// @note this operator ignores parameters set in Constructor
     
    293293  /// @brief General
    294294  ///
    295   class RandomDiscreteGeneral : public RandomDiscrete {
     295  class DiscreteGeneral : public Discrete {
    296296  };
    297297
Note: See TracChangeset for help on using the changeset viewer.