std::gamma_...distribution(3)

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

πŸ’– NAME πŸ’–

Okay bestie, you found the std::gamma_...distribution(3) page from the C++ Standard Libary, and the manual name is literally std::gamma_...distribution(3). The main character is std::gamma_distribution::gamma_distribution - std::gamma_distribution::gamma_distribution. No cap, that's the name section. πŸŽ€

✨ Synopsis ✨

Here's the constructor lineup, copied with all its little labels and (since C++11) moments:

          gamma_distribution() : gamma_distribution(1.0) {}
       (1) (since C++11)
          explicit gamma_distribution( RealType alpha, RealType beta = 1.0
       (2) (since C++11)
          );
          explicit gamma_distribution( const param_type& params );
       (3) (since C++11)

Constructs a new distribution object. That's the whole assignment. πŸ’…

  • 1) The constructor labeled (1) is the no-argument one in the synopsis above, and it's marked (since C++11).
  • 2) Uses alpha and beta as the distribution parameters.
  • 3) Uses params as the distribution parameters.

πŸ¦‹ Parameters πŸ¦‹

  • alpha β€” the Ξ± distribution parameter (shape). She's the shape bestie. 🌸
  • beta β€” the Ξ² distribution parameter (scale). That's the scale one. πŸŽ€
  • params β€” the distribution parameter set. The whole little bundle. 🫢

πŸ’… Defect reports πŸ’…

The following behavior-changing defect reports were applied retroactively to previously published C++ standards. Yes, retroactively β€” the plot twist energy is real. 😭

  • DR: P0935R0
    • Applied to: C++11
    • Behavior as published: default constructor was explicit
    • Correct behavior: made implicit

Mwah πŸ’‹ source: http://cppreference.com; version/date: 2024.06.10; manual page: std::gamma_...distribution(3). Slay and hydrate. πŸ’–

πŸ“¦ where this page comes from