8#ifndef LIBFXD_RANDOM_HPP
9#define LIBFXD_RANDOM_HPP
22 template<fixed_po
int Fxd>
24 private std::uniform_int_distribution<typename Fxd::raw_type> {
26 using parent = std::uniform_int_distribution<typename Fxd::raw_type>;
53 result_type b_ = std::numeric_limits<result_type>::max()) :
85 result_type b_ = std::numeric_limits<result_type>::max()) :
86 parent{a_.raw_value, b_.raw_value}
93 parent{typename parent::
param_type{p.
a().raw_value, p.
b().raw_value}}
106 return result_type::from_raw(parent::a());
115 return result_type::from_raw(parent::b());
133 parent::param(
typename parent::param_type{p.
a().raw_value,
159 template<
typename Gen>
164 return result_type::from_raw(parent::operator()(g));
169 template<
typename Gen>
174 typename parent::param_type pp{p.
a().raw_value, p.
b().raw_value};
175 return result_type::from_raw(parent::operator()(g, pp));
184 template<
typename CharT,
187 std::basic_ostream<CharT, Traits>&
188 operator <<(std::basic_ostream<CharT, Traits>& out,
191 const auto flags = out.flags();
192 const auto fill = out.fill();
193 const auto prec = out.precision();
194 const auto space = out.widen(
' ');
196 out << std::scientific << std::left;
198 out.precision(std::numeric_limits<result_type>::max_digits10);
201 out << dist.
a() << space << dist.
b();
217 template<
typename CharT,
220 std::basic_istream<CharT, Traits>&
224 const auto flags = in.flags();
This is the namespace where the entire library is defined.