Go to the documentation of this file.
32 #ifndef ABSL_RANDOM_UNIFORM_REAL_DISTRIBUTION_H_
33 #define ABSL_RANDOM_UNIFORM_REAL_DISTRIBUTION_H_
40 #include <type_traits>
42 #include "absl/meta/type_traits.h"
43 #include "absl/random/internal/fast_uniform_bits.h"
44 #include "absl/random/internal/generate_real.h"
45 #include "absl/random/internal/iostream_state_saver.h"
63 template <
typename RealType =
double>
64 class uniform_real_distribution {
88 return a.lo_ ==
b.lo_ &&
a.hi_ ==
b.hi_;
100 "Class-template absl::uniform_real_distribution<> must be "
101 "parameterized using a floating-point type.");
117 template <
typename URBG>
122 template <
typename URBG>
124 const param_type&
p);
137 return a.param_ ==
b.param_;
141 return a.param_ !=
b.param_;
152 template <
typename RealType>
153 template <
typename URBG>
164 GenerateRealFromBits<real_type, GeneratePositiveTag, true>(
174 template <
typename CharT,
typename Traits,
typename RealType>
176 std::basic_ostream<CharT, Traits>& os,
180 os <<
x.a() << os.fill() <<
x.b();
184 template <
typename CharT,
typename Traits,
typename RealType>
186 std::basic_istream<CharT, Traits>& is,
191 auto a = random_internal::read_floating_point<result_type>(is);
192 if (is.fail())
return is;
193 auto b = random_internal::read_floating_point<result_type>(is);
195 x.param(param_type(
a,
b));
202 #endif // ABSL_RANDOM_UNIFORM_REAL_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)
FieldDescriptor::Type real_type(FieldType type)
typename std::conditional< B, T, F >::type conditional_t
#define ABSL_NAMESPACE_END
RealType GenerateRealFromBits(uint64_t bits, int exp_bias=0)
#define ABSL_NAMESPACE_BEGIN
const typedef int * result_type
OPENSSL_EXPORT GENERAL_NAME * gen
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 03:00:44