Go to the documentation of this file.
15 #ifndef ABSL_RANDOM_LOG_UNIFORM_INT_DISTRIBUTION_H_
16 #define ABSL_RANDOM_LOG_UNIFORM_INT_DISTRIBUTION_H_
24 #include <type_traits>
26 #include "absl/numeric/bits.h"
27 #include "absl/random/internal/fastmath.h"
28 #include "absl/random/internal/generate_real.h"
29 #include "absl/random/internal/iostream_state_saver.h"
30 #include "absl/random/internal/traits.h"
31 #include "absl/random/uniform_int_distribution.h"
43 template <
typename IntType =
int>
73 std::numeric_limits<unsigned_type>::digits);
84 const double inv_log_base = 1.0 /
std::log(
static_cast<double>(
base_));
95 return a.min_ ==
b.min_ &&
a.max_ ==
b.max_ &&
a.base_ ==
b.base_;
115 "Class-template absl::log_uniform_int_distribution<> must be "
116 "parameterized using an integral type.");
132 template <
typename URBG>
137 template <
typename URBG>
152 return a.param_ ==
b.param_;
156 return a.param_ !=
b.param_;
162 template <
typename URNG>
164 const param_type&
p);
169 template <
typename IntType>
170 template <
typename URBG>
190 top_e = (
e >= std::numeric_limits<unsigned_type>::digits)
194 const double r = std::pow(
static_cast<double>(
p.base()),
d);
195 const double s = (
r *
static_cast<double>(
p.base())) - 1.0;
216 template <
typename CharT,
typename Traits,
typename IntType>
218 std::basic_ostream<CharT, Traits>& os,
223 os << static_cast<stream_type>((
x.min)()) << os.fill()
229 template <
typename CharT,
typename Traits,
typename IntType>
231 std::basic_istream<CharT, Traits>& is,
256 #endif // ABSL_RANDOM_LOG_UNIFORM_INT_DISTRIBUTION_H_
istream_state_saver< std::basic_istream< CharT, Traits > > make_istream_state_saver(std::basic_istream< CharT, Traits > &is, std::ios_base::fmtflags flags=std::ios_base::dec|std::ios_base::scientific|std::ios_base::skipws)
ABSL_NAMESPACE_BEGIN std::ostream & operator<<(std::ostream &os, absl::LogSeverity s)
typename unsigned_bits< std::numeric_limits< typename MakeUnsigned< IntType >::type >::digits >::type type
#define ABSL_NAMESPACE_END
#define ABSL_NAMESPACE_BEGIN
const typedef int * result_type
constexpr uint128 operator>>(uint128 lhs, int amount)
ostream_state_saver< std::basic_ostream< CharT, Traits > > make_ostream_state_saver(std::basic_ostream< CharT, Traits > &os, std::ios_base::fmtflags flags=std::ios_base::dec|std::ios_base::left|std::ios_base::scientific)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:16