STD::PIECEWISE_LINEAR_DISTRIBUTION::PARAM_TYPE(3)
π 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 aparam_typefrom a range of interval boundaries__bfirstβ¦__bendplus 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 aninitializer_listof boundaries__bland a function__fwthat 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__nwintervals wide, spanning from__xminto__xmax, and calls__fwfor the weights. so you get the shape and the size, slay. πstd::vector< double > densities() constβ hands you back astd::vector< double >of the densities. the actual numbers, bestie. πstd::vector< _RealType > intervals() constβ and this one gives you astd::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 twoparam_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