23 template <
typename Quantity>
25 static_assert(is_quantity_v<Quantity>,
"usable only with Quantity types");
27 typedef typename Quantity::value_type real_type;
28 typedef std::exponential_distribution<real_type> distribution_type;
31 typedef Quantity value_type;
43 if (
this == &other)
return *
this;
54 value_type
getBeta()
const {
return beta_; }
62 void setBeta(value_type
const& beta) { beta_ = beta; }
72 template <
class Generator>
74 return beta_ * dist_(g);
78 distribution_type dist_{1.};
Import and extend the phys::units package.
Describes a random distribution with for a physical quantity of type Quantity.
`, since they are used everywhere as integral part of the framework.
void setBeta(value_type const &beta)
Set parameter of exponential distribution .
value_type operator()(Generator &g)
Generate a random number distributed like .
value_type getBeta() const
Get parameter of exponential distribution .