/
usr
/
include
/
boost
/
random
/
/usr/include/boost/random
mkdir
upload
Name
Size
Mode
Actions
detail/
-
0755
rm
additive_combine.hpp
8826
0644
edit
dl
rm
bernoulli_distribution.hpp
5608
0644
edit
dl
rm
beta_distribution.hpp
5900
0644
edit
dl
rm
binomial_distribution.hpp
12985
0644
edit
dl
rm
cauchy_distribution.hpp
6528
0644
edit
dl
rm
chi_squared_distribution.hpp
6322
0644
edit
dl
rm
discard_block.hpp
7991
0644
edit
dl
rm
discrete_distribution.hpp
21137
0644
edit
dl
rm
exponential_distribution.hpp
20895
0644
edit
dl
rm
extreme_value_distribution.hpp
5611
0644
edit
dl
rm
faure.hpp
11474
0644
edit
dl
rm
fisher_f_distribution.hpp
5924
0644
edit
dl
rm
gamma_distribution.hpp
9166
0644
edit
dl
rm
generate_canonical.hpp
2954
0644
edit
dl
rm
geometric_distribution.hpp
7339
0644
edit
dl
rm
hyperexponential_distribution.hpp
36980
0644
edit
dl
rm
independent_bits.hpp
9117
0644
edit
dl
rm
inversive_congruential.hpp
9550
0644
edit
dl
rm
lagged_fibonacci.hpp
18256
0644
edit
dl
rm
laplace_distribution.hpp
5743
0644
edit
dl
rm
linear_congruential.hpp
16214
0644
edit
dl
rm
linear_feedback_shift.hpp
7162
0644
edit
dl
rm
lognormal_distribution.hpp
8051
0644
edit
dl
rm
mersenne_twister.hpp
24094
0644
edit
dl
rm
negative_binomial_distribution.hpp
6911
0644
edit
dl
rm
niederreiter_base2.hpp
11736
0644
edit
dl
rm
non_central_chi_squared_distribution.hpp
7724
0644
edit
dl
rm
normal_distribution.hpp
17441
0644
edit
dl
rm
piecewise_constant_distribution.hpp
17186
0644
edit
dl
rm
piecewise_linear_distribution.hpp
18802
0644
edit
dl
rm
poisson_distribution.hpp
10145
0644
edit
dl
rm
random_device.hpp
5032
0644
edit
dl
rm
random_number_generator.hpp
1958
0644
edit
dl
rm
ranlux.hpp
3292
0644
edit
dl
rm
seed_seq.hpp
3792
0644
edit
dl
rm
shuffle_order.hpp
9181
0644
edit
dl
rm
shuffle_output.hpp
1352
0644
edit
dl
rm
sobol.hpp
7704
0644
edit
dl
rm
student_t_distribution.hpp
5633
0644
edit
dl
rm
subtract_with_carry.hpp
21590
0644
edit
dl
rm
taus88.hpp
1164
0644
edit
dl
rm
traits.hpp
4165
0644
edit
dl
rm
triangle_distribution.hpp
7033
0644
edit
dl
rm
uniform_01.hpp
7538
0644
edit
dl
rm
uniform_int.hpp
2909
0644
edit
dl
rm
uniform_int_distribution.hpp
16199
0644
edit
dl
rm
uniform_on_sphere.hpp
8812
0644
edit
dl
rm
uniform_real.hpp
2449
0644
edit
dl
rm
uniform_real_distribution.hpp
7726
0644
edit
dl
rm
uniform_smallint.hpp
12230
0644
edit
dl
rm
variate_generator.hpp
3708
0644
edit
dl
rm
weibull_distribution.hpp
5524
0644
edit
dl
rm
xor_combine.hpp
7049
0644
edit
dl
rm
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 <boost/random/detail/ptr_helper.hpp> #include <boost/random/detail/disable_warnings.hpp> 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 Engine, class Distribution> class variate_generator { private: typedef boost::random::detail::ptr_helper<Engine> 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<class T> 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 <boost/random/detail/enable_warnings.hpp> #endif // BOOST_RANDOM_RANDOM_GENERATOR_HPP
Save
cmd:
run