/
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/traits.hpp
(4165B)
/* boost random/traits.hpp header file * * Copyright John Maddock 2015 * 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. * * These traits classes serve two purposes: they are designed to mostly * work out of the box for multiprecision types (ie number types that are * C++ class types and not integers or floats from type-traits point of view), * they are also a potential point of specialization for user-defined * number types. * * $Id$ */ #ifndef BOOST_RANDOM_TRAITS_HPP #define BOOST_RANDOM_TRAITS_HPP #include <boost/type_traits/is_signed.hpp> #include <boost/type_traits/is_integral.hpp> #include <boost/type_traits/make_unsigned.hpp> #include <boost/mpl/bool.hpp> #include <limits> namespace boost { namespace random { namespace traits { // \cond show_private template <class T, bool intrinsic> struct make_unsigned_imp { typedef typename boost::make_unsigned<T>::type type; }; template <class T> struct make_unsigned_imp<T, false> { BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized); BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_signed == false); BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_integer == true); typedef T type; }; // \endcond /** \brief Converts the argument type T to an unsigned type. * * This trait has a single member `type` which is the unsigned type corresponding to T. * Note that * if T is signed, then member `type` *should define a type with one more bit precision than T*. For built-in * types this trait defaults to `boost::make_unsigned<T>::type`. For user defined types it simply asserts that * the argument type T is an unsigned integer (using std::numeric_limits). * User defined specializations may be provided for other cases. */ template <class T> struct make_unsigned // \cond show_private : public make_unsigned_imp < T, boost::is_integral<T>::value > // \endcond {}; // \cond show_private template <class T, bool intrinsic> struct make_unsigned_or_unbounded_imp { typedef typename boost::make_unsigned<T>::type type; }; template <class T> struct make_unsigned_or_unbounded_imp<T, false> { BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized); BOOST_STATIC_ASSERT((std::numeric_limits<T>::is_signed == false) || (std::numeric_limits<T>::is_bounded == false)); BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_integer == true); typedef T type; }; // \endcond /** \brief Converts the argument type T to either an unsigned type or an unbounded integer type. * * This trait has a single member `type` which is either the unsigned type corresponding to T or an unbounded * integer type. This trait is used to generate types suitable for the calculation of a range: as a result * if T is signed, then member `type` *should define a type with one more bit precision than T*. For built-in * types this trait defaults to `boost::make_unsigned<T>::type`. For user defined types it simply asserts that * the argument type T is either an unbounded integer, or an unsigned one (using std::numeric_limits). * User defined specializations may be provided for other cases. */ template <class T> struct make_unsigned_or_unbounded // \cond show_private : public make_unsigned_or_unbounded_imp < T, boost::is_integral<T>::value > // \endcond {}; /** \brief Traits class that indicates whether type T is an integer */ template <class T> struct is_integral : public mpl::bool_<boost::is_integral<T>::value || (std::numeric_limits<T>::is_integer)> {}; /** \brief Traits class that indicates whether type T is a signed integer */ template <class T> struct is_signed : public mpl::bool_ < boost::is_signed<T>::value || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer && std::numeric_limits<T>::is_signed)> {}; } } } #endif
Save
cmd:
run