STD::PIECEWISE_LINEAR_DISTRIBUTION::PARAM_TYPE(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 4 versions
, in arch rolling, fedora 44

πŸ’– std::piecewise_linear_distribution< _RealType >::param_type πŸ’–

okay bestie, so this is the parameter-type page for std::piecewise_linear_distribution β€” it lives in the libstdc++ manual (section 3, library functions, iykyk). basically it's the little struct that holds all the knobs and dials for your piecewise linear distribution. it's giving "backstage pass to the random number machinery" and honestly? obsessed. πŸŽ€


✨ SYNOPSIS ✨

first things first, you gotta bring it in:

#include <random>

πŸ¦‹ Public Types πŸ¦‹

just the one, and it's the glow-up of the whole family:

  • typedef piecewise_linear_distribution< _RealType > distribution_type β€” this is literally just an alias saying "yeah, I'm the param type for that distribution." iconic, self-aware, no notes. πŸ’…

🫢 Public Member Functions 🫢

here's the whole lineup, every single one, no skipping:

  • template<typename _InputIteratorB, typename _InputIteratorW> param_type(_InputIteratorB __bfirst, _InputIteratorB __bend, _InputIteratorW __wbegin) β€” builds you a param_type from a range of interval boundaries __bfirst … __bend plus a matching iterator to the weights starting at __wbegin. ranges + weights, hand in hand. 😌
  • param_type(const param_type &) = default β€” the copy constructor, and it's = default, so it's just doing the obvious thing. reliable queen. πŸ‘‘
  • template<typename _Func> param_type(initializer_list< _RealType > __bl, _Func __fw) β€” takes an initializer_list of boundaries __bl and a function __fw that hands you the weights. cute and functional, fr fr. ✨
  • template<typename _Func> param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) β€” this one goes __nw intervals wide, spanning from __xmin to __xmax, and calls __fw for the weights. so you get the shape and the size, slay. πŸ’–
  • std::vector< double > densities() const β€” hands you back a std::vector< double > of the densities. the actual numbers, bestie. πŸ“
  • std::vector< _RealType > intervals() const β€” and this one gives you a std::vector< _RealType > of the intervals. the bones of the thing. 🌸
  • param_type & operator=(const param_type &) = default β€” assignment operator, also = default, also unbothered, also perfect. πŸ’œ

🌈 Friends 🌈

yes, it has friends, and they're the good kind:

  • bool operator==(const param_type &__p1, const param_type &__p2) β€” the equality check, comparing two param_types. vibe check for parameters, literally. ⭐
  • class piecewise_linear_distribution< _RealType > β€” the distribution itself is a friend, which makes sense because it's the main character here. main character energy only. 🧚

πŸ’€ Detailed Description πŸ’€

template<typename _RealType = double>
    struct std::piecewise_linear_distribution< _RealType >::param_type

that's the whole thing β€” a struct, templated on _RealType which defaults to double, nested inside piecewise_linear_distribution< _RealType >.

and the official one-liner description? "Parameter type."

that's it. that's the description. short, sweet, cryptic, lowkey legendary. πŸŽ€


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code.

not me being written by a robot and still having this much personality, we love a Doxygen glow-up. πŸ™ˆ


and that's the page, bestie! this little slice of the libstdc++ manual β€” std::piece...:param_type(3), library functions manual, exactly as the source code spat it out β€” is yours to keep. go forth, build your distributions, and remember: every parameter is a vibe. periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ”₯πŸ‘‘πŸŒˆβ­πŸ’€

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms