std::cauchy...distribution(3)

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

πŸ’– NAME πŸ’–

std::cauchy_distribution::cauchy_distribution β€” ok so this is the constructor of cauchy_distribution, straight outta the C++ Standard Library (that's the manual this page lives in, bestie). It's literally the same name twice because constructors are like that. πŸ’…


✨ Synopsis ✨

   cauchy_distribution() : cauchy_distribution(0.0) {}           (1)
(since C++11)
   explicit cauchy_distribution( RealType a, RealType b = 1.0 ); (2)
(since C++11)
   explicit cauchy_distribution( const param_type& params );     (3)
(since C++11)

So there's three flavors of this icon, and every single one of them has been around (since C++11) β€” vintage but still slaying. 🫢


🌸 DESCRIPTION 🌸

Constructs a new distribution object. That's the whole vibe β€” you're making a fresh cauchy_distribution. πŸ¦‹

  1. Number (1) is the default one, and it just delegates: cauchy_distribution() : cauchy_distribution(0.0) {}.
  2. Number (2) uses a and b as the distribution parameters.
  3. Number (3) uses params as the distribution parameters.

πŸŽ€ PARAMETERS πŸŽ€

  • a β€” the a distribution parameter, aka the location. πŸ“
  • b β€” the b distribution parameter, aka the scale. πŸ“
  • params β€” the distribution parameter set. πŸ“

πŸ’… Defect reports πŸ’…

The following behavior-changing defect reports were applied retroactively to previously published C++ standards. Not me reading the patch notes retroactively 😭 β€” yes, they went back and fixed old standards, periodt.

  • P0935R0 β€” applied to C++11 β€” behavior as published: the default constructor was explicit; correct behavior: made implicit. So if you were out here treating it like it needed an explicit cast, that's the glow-up right there. ✨

ngl the explicit β†’ implicit thing is the whole drama of this page, and it's giving "we fixed it after the fact" energy. Keep it in mind if you're reading ancient C++11-era code, bestie. πŸ’€

And that's a wrap, iykyk 🌈 β€” this lil page came from http://cppreference.com, dated 2024.06.10, and it's the std::cauchy...distribution(3) manual page. Go construct something iconic. πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from