std::piecew...ibution::max(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– 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