/usr/include/boost/random
NameSizeModeActions
detail/-0755rm
additive_combine.hpp88260644editdlrm
bernoulli_distribution.hpp56080644editdlrm
beta_distribution.hpp59000644editdlrm
binomial_distribution.hpp129850644editdlrm
cauchy_distribution.hpp65280644editdlrm
chi_squared_distribution.hpp63220644editdlrm
discard_block.hpp79910644editdlrm
discrete_distribution.hpp211370644editdlrm
exponential_distribution.hpp208950644editdlrm
extreme_value_distribution.hpp56110644editdlrm
faure.hpp114740644editdlrm
fisher_f_distribution.hpp59240644editdlrm
gamma_distribution.hpp91660644editdlrm
generate_canonical.hpp29540644editdlrm
geometric_distribution.hpp73390644editdlrm
hyperexponential_distribution.hpp369800644editdlrm
independent_bits.hpp91170644editdlrm
inversive_congruential.hpp95500644editdlrm
lagged_fibonacci.hpp182560644editdlrm
laplace_distribution.hpp57430644editdlrm
linear_congruential.hpp162140644editdlrm
linear_feedback_shift.hpp71620644editdlrm
lognormal_distribution.hpp80510644editdlrm
mersenne_twister.hpp240940644editdlrm
negative_binomial_distribution.hpp69110644editdlrm
niederreiter_base2.hpp117360644editdlrm
non_central_chi_squared_distribution.hpp77240644editdlrm
normal_distribution.hpp174410644editdlrm
piecewise_constant_distribution.hpp171860644editdlrm
piecewise_linear_distribution.hpp188020644editdlrm
poisson_distribution.hpp101450644editdlrm
random_device.hpp50320644editdlrm
random_number_generator.hpp19580644editdlrm
ranlux.hpp32920644editdlrm
seed_seq.hpp37920644editdlrm
shuffle_order.hpp91810644editdlrm
shuffle_output.hpp13520644editdlrm
sobol.hpp77040644editdlrm
student_t_distribution.hpp56330644editdlrm
subtract_with_carry.hpp215900644editdlrm
taus88.hpp11640644editdlrm
traits.hpp41650644editdlrm
triangle_distribution.hpp70330644editdlrm
uniform_01.hpp75380644editdlrm
uniform_int.hpp29090644editdlrm
uniform_int_distribution.hpp161990644editdlrm
uniform_on_sphere.hpp88120644editdlrm
uniform_real.hpp24490644editdlrm
uniform_real_distribution.hpp77260644editdlrm
uniform_smallint.hpp122300644editdlrm
variate_generator.hpp37080644editdlrm
weibull_distribution.hpp55240644editdlrm
xor_combine.hpp70490644editdlrm
Edit: /usr/include/boost/random/variate_generator.hpp (3708B)
/* boost random/variate_generator.hpp header file * * Copyright Jens Maurer 2002 * Copyright Steven Watanabe 2011 * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * See http://www.boost.org for most recent version including documentation. * * $Id$ * */ #ifndef BOOST_RANDOM_RANDOM_GENERATOR_HPP #define BOOST_RANDOM_RANDOM_GENERATOR_HPP #include #include namespace boost { /// \cond hide_private_members namespace random { ///\endcond /** * A random variate generator is used to join a random number * generator together with a random number distribution. * Boost.Random provides a vast choice of \generators as well * as \distributions. * * The argument for the template parameter Engine shall be of * the form U, U&, or U*, where U models a * \uniform_random_number_generator. Then, the member * engine_value_type names U (not the pointer or reference to U). * * Specializations of @c variate_generator satisfy the * requirements of CopyConstructible. They also satisfy the * requirements of Assignable unless the template parameter * Engine is of the form U&. * * The complexity of all functions specified in this section * is constant. No function described in this section except * the constructor throws an exception. */ template class variate_generator { private: typedef boost::random::detail::ptr_helper helper_type; public: typedef typename helper_type::value_type engine_value_type; typedef Engine engine_type; typedef Distribution distribution_type; typedef typename Distribution::result_type result_type; /** * Constructs a @c variate_generator object with the associated * \uniform_random_number_generator eng and the associated * \random_distribution d. * * Throws: If and what the copy constructor of Engine or * Distribution throws. */ variate_generator(Engine e, Distribution d) : _eng(e), _dist(d) { } /** Returns: distribution()(engine()) */ result_type operator()() { return _dist(engine()); } /** * Returns: distribution()(engine(), value). */ template result_type operator()(const T& value) { return _dist(engine(), value); } /** * Returns: A reference to the associated uniform random number generator. */ engine_value_type& engine() { return helper_type::ref(_eng); } /** * Returns: A reference to the associated uniform random number generator. */ const engine_value_type& engine() const { return helper_type::ref(_eng); } /** Returns: A reference to the associated \random_distribution. */ distribution_type& distribution() { return _dist; } /** * Returns: A reference to the associated random distribution. */ const distribution_type& distribution() const { return _dist; } /** * Precondition: distribution().min() is well-formed * * Returns: distribution().min() */ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (distribution().min)(); } /** * Precondition: distribution().max() is well-formed * * Returns: distribution().max() */ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (distribution().max)(); } private: Engine _eng; distribution_type _dist; }; } // namespace random using random::variate_generator; } // namespace boost #include #endif // BOOST_RANDOM_RANDOM_GENERATOR_HPP