/usr/include/boost/random/detail
NameSizeModeActions
auto_link.hpp9590644editdlrm
config.hpp5380644editdlrm
const_mod.hpp55660644editdlrm
disable_warnings.hpp8230644editdlrm
enable_warnings.hpp5520644editdlrm
generator_bits.hpp8740644editdlrm
generator_seed_seq.hpp8610644editdlrm
gray_coded_qrng.hpp46620644editdlrm
integer_log2.hpp21810644editdlrm
int_float_pair.hpp41780644editdlrm
iterator_mixin.hpp13030644editdlrm
large_arithmetic.hpp36150644editdlrm
niederreiter_base2_table.hpp362850644editdlrm
operators.hpp36730644editdlrm
polynomial.hpp133050644editdlrm
ptr_helper.hpp15340644editdlrm
qrng_base.hpp86590644editdlrm
seed.hpp50200644editdlrm
seed_impl.hpp142830644editdlrm
signed_unsigned_tools.hpp25350644editdlrm
sobol_table.hpp2340130644editdlrm
uniform_int_float.hpp21230644editdlrm
vector_io.hpp17920644editdlrm
Edit: /usr/include/boost/random/detail/uniform_int_float.hpp (2123B)
/* boost random/detail/uniform_int_float.hpp header file * * Copyright Jens Maurer 2000-2001 * 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_DETAIL_UNIFORM_INT_FLOAT_HPP #define BOOST_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP #include #include #include #include #include #include namespace boost { namespace random { namespace detail { template class uniform_int_float { public: typedef URNG base_type; typedef typename base_type::result_type base_result; typedef typename boost::uint_t< (std::numeric_limits::digits < std::numeric_limits::digits)? std::numeric_limits::digits : std::numeric_limits::digits >::fast result_type; uniform_int_float(base_type& rng) : _rng(rng) {} static result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () { return 0; } static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () { std::size_t digits = std::numeric_limits::digits; if(detail::generator_bits::value() < digits) { digits = detail::generator_bits::value(); } return (result_type(2) << (digits - 1)) - 1; } base_type& base() { return _rng; } const base_type& base() const { return _rng; } result_type operator()() { base_result range = static_cast((max)())+1; return static_cast(_rng() * range); } private: base_type& _rng; }; } // namespace detail } // namespace random } // namespace boost #include #endif // BOOST_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP