mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
The Laplace (double exponential) continuous distribution for random numbers.
The formula for the exponential probability density function is \(p(x|\lambda) = \frac{\lambda}{2} e^{-\lambda x}\).
Mean | \(0\) |
Median | \(0\) |
Mode | \(0\) |
Range | \([-\infty, \infty]\) |
Standard Deviation | \(\frac{\sqrt{2}}{\lambda}\) |
This is based on the implementation of the exponential distribution in the GNU ISO C++ Library version 4.6.
Definition at line 136 of file randomT.hpp.
#include <math/randomT.hpp>
Classes | |
struct | param_type |
Public Types | |
typedef _RealType | result_type |
Public Member Functions | |
laplace_distribution (const result_type &__lambda=result_type(1)) | |
Constructs a Laplace (double exponential) distribution with inverse scale parameter \(\lambda\). More... | |
void | reset () |
Resets the distribution state. More... | |
_RealType | lambda () const |
Returns the inverse scale parameter of the distribution. More... | |
param_type | param () const |
Returns the parameter set of the distribution. More... | |
void | param (const param_type &__param) |
Sets the parameter set of the distribution. More... | |
result_type | min () const |
Returns the greatest lower bound value of the distribution. More... | |
result_type | max () const |
Returns the least upper bound value of the distribution. More... | |
template<typename _UniformRandomNumberGenerator > | |
result_type | operator() (_UniformRandomNumberGenerator &__urng) |
Generating functions. More... | |
typedef _RealType mx::math::laplace_distribution< _RealType >::result_type |
The type of the range of the distribution.
Definition at line 142 of file randomT.hpp.
|
inlineexplicit |
Constructs a Laplace (double exponential) distribution with inverse scale parameter \(\lambda\).
Definition at line 171 of file randomT.hpp.
|
inline |
Returns the inverse scale parameter of the distribution.
Definition at line 185 of file randomT.hpp.
|
inline |
Returns the least upper bound value of the distribution.
Definition at line 218 of file randomT.hpp.
|
inline |
Returns the greatest lower bound value of the distribution.
Definition at line 210 of file randomT.hpp.
|
inline |
Generating functions.
Definition at line 226 of file randomT.hpp.
References mx::math::laplace_distribution< _RealType >::param().
|
inline |
Returns the parameter set of the distribution.
Definition at line 193 of file randomT.hpp.
Referenced by mx::math::laplace_distribution< _RealType >::operator()(), and mx::math::operator==().
|
inline |
Sets the parameter set of the distribution.
__param | The new parameter set of the distribution. |
Definition at line 202 of file randomT.hpp.
|
inline |
Resets the distribution state.
Has no effect on Laplace distributions.
Definition at line 180 of file randomT.hpp.