__gnu_cxx::subtractive_rng(3cxx)
π NAME
__gnu_cxx::subtractive_rng β okay so this is a whole random-number-generator class living in the __gnu_cxx namespace, and it's been sitting in the 3cxx section of the manual this whole time, waiting for you to notice it. Bestie, we're noticing it now. π«Ά
β¨ SYNOPSIS β¨
#include <functional>
Inherits std::unary_function< unsigned int, unsigned int >. Yes, that std::unary_function. She's an heiress, she's got inheritance, it's giving old money. π
π Public Types
typedef unsigned int argument_typeβ literally just the type of the argument. That's the whole vibe.typedef unsigned int result_typeβ and this one's the return type. She gives back what she takes, size-wise.
π¦ Public Member Functions
subtractive_rng ()β the default ctor β¨ it initializes its state with some number you don't see. Not me being mysterious, that's genuinely what the docs say. It's a secret. iykyk.subtractive_rng (unsigned int __seed)β the ctor that lets you initialize the seed yourself, so you get to be the main character of the entropy. πvoid _M_initialize (unsigned int __seed)β internal init helper, does its thing with a seed. Move along, nothing to see, but we're listing it because we keep every detail in this house. πunsigned int operator() (unsigned int __limit)β call it like a function, hand it a limit, get back a number less than the argument. Periodt. π
πΈ Detailed Description
The subtractive_rng class is documented on SGI's site β so like, if you want the deep lore, that's where she lives. Meanwhile, right here, one thing matters a whole lot:
β οΈ this code assumes thatintis 32 bits. no cap. if yourintisn't 32 bits, this is not the fairy tale you were promised. π§
π Member Typedef Documentation
typedef unsigned int std::unary_function< unsigned int , unsigned int >::argument_type [inherited]
argument_type is the type of the argument. inherited, so it's not even hers originally β she's just wearing her mama's typedef and it slays. β¨
typedef unsigned int std::unary_function< unsigned int , unsigned int >::result_type [inherited]
result_type is the return type. also inherited. also serving. π
π§ Constructor & Destructor Documentation
__gnu_cxx::subtractive_rng::subtractive_rng (unsigned int __seed) [inline]
Ctor allowing you to initialize the seed. you're in control, you pick the number, you're the main character. π₯
__gnu_cxx::subtractive_rng::subtractive_rng () [inline]
Default ctor; initializes its state with some number you don't see. she keeps her secrets, and honestly? respect. π
π Member Function Documentation
unsigned int __gnu_cxx::subtractive_rng::operator() (unsigned int __limit) [inline]
Returns a number less than the argument. that's it, that's the function, and honestly it ate. π
β Author
Generated automatically by Doxygen for libstdc++ from the source code. not a human, not a vibe curator, just Doxygen doing Doxygen things. π
and that's the whole page, bestie π this little cutie came to you straight from libstdc++, filed under the 3cxx section β go forth and seed responsibly, mwah π¦πΈ
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2.1
- ubuntu noble: libstdc++-11-doc 11.4.0-9ubuntu1
- ubuntu noble: libstdc++-11-doc 11.5.0-1ubuntu1~24.04.1
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1.1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- ubuntu questing: libstdc++-15-doc 15.2.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms