Ignore:
Timestamp:
Apr 9, 2008, 6:11:07 PM (13 years ago)
Author:
Peter
Message:

replaced u_int with unsigned int or size_t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/random/random.h

    r1004 r1271  
    9898    /// generator can return.
    9999    ///
    100     u_long max(void) const;
     100    unsigned long max(void) const;
    101101
    102102    ///
     
    104104    /// generator can return.
    105105    ///
    106     u_long min(void) const;
     106    unsigned long min(void) const;
    107107
    108108    ///
     
    125125    /// @see seed_from_devurandom
    126126    ///
    127     void seed(u_long s) const;
     127    void seed(unsigned long s) const;
    128128
    129129    ///
     
    132132    /// @return The seed acquired from /dev/urandom.
    133133    ///
    134     u_long seed_from_devurandom(void);
     134    unsigned long seed_from_devurandom(void);
    135135
    136136    /**
     
    221221    /// @see seed_from_devurandom, RNG::seed_from_devurandom, RNG::seed
    222222    ///
    223     void seed(u_long s) const;
     223    void seed(unsigned long s) const;
    224224
    225225    ///
     
    230230    /// @see seed, RNG::seed_from_devurandom, RNG::seed
    231231    ///
    232     u_long seed_from_devurandom(void) { return rng_->seed_from_devurandom(); }
     232    unsigned long seed_from_devurandom(void);
    233233
    234234    ///
    235235    /// @return A random number.
    236236    ///
    237     virtual u_long operator()(void) const = 0;
     237    virtual unsigned long operator()(void) const = 0;
    238238   
    239239  protected:
     
    268268    /// @return A random number.
    269269    ///
    270     u_long operator()(void) const;
     270    unsigned long operator()(void) const;
    271271
    272272  private:
     
    302302       is thrown.
    303303    */
    304     DiscreteUniform(u_long n=0);
     304    DiscreteUniform(unsigned long n=0);
    305305
    306306    /**
     
    311311       created.
    312312
    313        \see DiscreteUniform(const u_long n=0)
     313       \see DiscreteUniform(const unsigned long n=0)
    314314    */
    315     u_long operator()(void) const;
     315    unsigned long operator()(void) const;
    316316
    317317    /**
     
    325325       underlying generator.
    326326    */
    327     u_long operator()(u_long n) const;
    328 
    329   private:
    330     u_long range_;
     327    unsigned long operator()(unsigned long n) const;
     328
     329  private:
     330    unsigned long range_;
    331331  };
    332332
     
    359359    /// @return A Poisson distributed number.
    360360    ///
    361     u_long operator()(void) const;
     361    unsigned long operator()(void) const;
    362362
    363363    ///
     
    367367    /// @note this operator ignores parameters set in Constructor
    368368    ///
    369     u_long operator()(const double m) const;
     369    unsigned long operator()(const double m) const;
    370370
    371371  private:
     
    403403    /// @see seed_from_devurandom, RNG::seed_from_devurandom, RNG::seed
    404404    ///
    405     void seed(u_long s) const;
     405    void seed(unsigned long s) const;
    406406
    407407    ///
     
    412412    /// @see seed, RNG::seed_from_devurandom, RNG::seed
    413413    ///
    414     u_long seed_from_devurandom(void) { return rng_->seed_from_devurandom(); }
     414    unsigned long seed_from_devurandom(void) { return rng_->seed_from_devurandom(); }
    415415
    416416    ///
Note: See TracChangeset for help on using the changeset viewer.