std::piecew...ibution::max(3)
π std::piecewise_constant_distribution::max(3) π
okay so bestie, welcome to the glow-up corner of the C++ Standard Libary (yes that's how the manual spells it, we don't fix, we stan π«Ά). This little page is all about one tiny overachiever member function and honestly? It ate.
β¨ NAME β¨
std::piecewise_constant_distribution::max β literally just std::piecewise_constant_distribution::max, no notes, that's the whole name, she's self-titled π
πΈ SYNOPSIS πΈ
result_type max() const; (since C++11)
so this bad boy has been around since C++11 (era icon, no cap). It takes zero arguments and doesn't touch anything β it's const, she's stable, she's low maintenance π
Returns the maximum value potentially generated by the distribution.
π Parameters π
(none)
literally nothing. empty. she needs no input, she's self-sufficient main character energy β¨
π¦ Return value π¦
The maximum value potentially generated by the distribution.
that's it, that's the tea π the biggest number this distribution could possibly hand you β she's telling you her ceiling, and it's giving generous.
π Complexity π
Constant.
like, O(1) constant, immediate, no scrolling, no waiting, no loading spinner π she answered before you even finished asking π
β See also β
minβ returns the minimum potentially generated value (C++11) (public member function)
go give her sister a visit too, they're a matching set bestie π she's the floor, this one's the ceiling, and together they're the whole vibe check π
and that's the page, bestie!! mwah π
ngl there is genuinely nothing dangerous in here, no undefined behaviour, no gotchas β just a quiet little const member function doing her job. iconic behaviour honestly.
source: http://cppreference.com Β· version date: 2024.06.10 β ty for reading angel, see u on cppreference dot com, mwah π«Άπβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms