std::uniform_real(3)
πΈ std::uniform_real(3) πΈ
okay so bestie, welcome to the std::uniform_real page, straight out of the Library Functions Manual β yes that's the manual name, we're getting it out of the way early because this page is a whole vibe and we have things to read π
β¨ NAME β¨
std::uniform_real β Uniform continuous distribution for random numbers. that's it, that's the pitch, and honestly? iconic.
π¦ SYNOPSIS π¦
π Public Types
typedef _RealType input_typetypedef _RealType result_type
π Public Member Functions
result_type max () constresult_type min () consttemplate<class _UniformRandomNumberGenerator > result_type operator() (_UniformRandomNumberGenerator &__urng)void reset ()uniform_real (_RealType __min=_RealType(0), _RealType __max=_RealType(1))
π Friends
template<typename _RealType1 , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const uniform_real< _RealType1 > &__x)template<typename _RealType1 , typename _CharT , typename _Traits > std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is, uniform_real< _RealType1 > &__x)
πΈ Detailed Description πΈ
template<typename _RealType = double> class std::uniform_real< _RealType >
Uniform continuous distribution for random numbers. literally what it says on the tin, no notes π
so the way this works: it's a continuous random distribution on the range [min, max) β note the half-open bracket situation, bestie, min is in, max is out β with equal probability throughout the whole range. every value in there is equally likely, nobody's the favourite child π«Ά
and hear me on this one: the URNG should be real-valued and deliver numbers in the range [0, 1). that's the requirement, don't come at it with something else, okay?? π
π Definition at line 2059 of file tr1_impl/random.
π§ Constructor & Destructor Documentation π§
β template<typename _RealType = double> std::uniform_real< _RealType >::uniform_real (_RealType __min = _RealType(0), _RealType __max = _RealType(1)) [inline, explicit]
Constructs a uniform_real object. yes bestie, we're building one, this is the moment π
Parameters:
- _
__min[IN]β The lower bound of the distribution. - _
__max[IN]β The upper bound of the distribution.
π Definition at line 2074 of file tr1_impl/random.
π₯ Friends And Related Function Documentation π₯
π« template<typename _RealType = double> template<typename _RealType1 , typename _CharT , typename _Traits > std::basic_ostream<_CharT, _Traits>& operator<< (std::basic_ostream< _CharT, _Traits > & __os, const uniform_real< _RealType1 > & __x) [friend]
Inserts a uniform_real random number distribution __x into the output stream __os. it's giving "let me introduce you to my friend, the stream" β¨
Parameters:
- _
__osβ An output stream. - _
__xβ Auniform_realrandom number distribution.
Returns:
The output stream with the state of __x inserted or in an error state. (so either the data made it in, or the stream's having a bad day π)
π template<typename _RealType = double> template<typename _RealType1 , typename _CharT , typename _Traits > std::basic_istream<_CharT, _Traits>& operator>> (std::basic_istream< _CharT, _Traits > & __is, uniform_real< _RealType1 > & __x) [friend]
Extracts a uniform_real random number distribution __x from the input stream __is. reading it back out, the reverse slay πΈ
Parameters:
- _
__isβ An input stream. - _
__xβ Auniform_realrandom number generator engine.
Returns:
The input stream with __x extracted or in an error state.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. not a human, a machine, and honestly it ate π
and that's the page bestie, hope you feel so informed rn π
π«Ά cute little sign-off: this gorgeous thing came from libstdc++, dated 21 Apr 2009, and it's page std::uniform_real(3) β go forth and generate your random reals, no cap π
π¦ where this page comes from
- nixpkgs unstable: std-man-pages 4.4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms