Changeset 2089


Ignore:
Timestamp:
Oct 21, 2009, 11:42:53 PM (12 years ago)
Author:
Peter
Message:

declare several constructors in random.h as explicit
fixes #571

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r2068 r2089  
    55Version 0.6 (released DATE)
    66
     7  - several constructors in namespace random are now declared explicit (#571)
    78  - pair_first_iterator and pair_second_iterator now work with
    89    const_iterator (ticket:562)
  • trunk/yat/random/random.h

    r1797 r2089  
    66/*
    77  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2009 Peter Johansson
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    176177    /// @brief Constructor
    177178    ///
    178     RNG_state(const RNG*);
     179    explicit RNG_state(const RNG*);
    179180
    180181    /**
     
    273274    /// @param hist is a Histogram defining the probability distribution
    274275    ///
    275     DiscreteGeneral(const statistics::Histogram& hist);
     276    explicit DiscreteGeneral(const statistics::Histogram& hist);
    276277   
    277278    /**
     
    340341       is thrown.
    341342    */
    342     DiscreteUniform(unsigned long n=0);
     343    explicit DiscreteUniform(unsigned long n=0);
    343344
    344345    /**
     
    392393    /// @param m is expectation value
    393394    ///
    394     Poisson(const double m=1);
     395    explicit Poisson(const double m=1);
    395396
    396397    ///
     
    492493    /// @param hist is a Histogram defining the probability distribution
    493494    ///
    494     ContinuousGeneral(const statistics::Histogram& hist);
     495    explicit ContinuousGeneral(const statistics::Histogram& hist);
    495496
    496497    ///
     
    526527    /// @param m is the expectation value of the distribution.
    527528    ///
    528     Exponential(const double m=1);
     529    explicit Exponential(const double m=1);
    529530
    530531    ///
     
    567568    /// @param m is the expectation value \f$ \mu \f$ of the distribution
    568569    ///
    569     Gaussian(const double s=1, const double m=0);
     570    explicit Gaussian(const double s=1, const double m=0);
    570571
    571572    ///
Note: See TracChangeset for help on using the changeset viewer.