| 
    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.
Tests:
Definition at line 141 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\).   | |
| void | reset () | 
| Resets the distribution state.   | |
| _RealType | lambda () const | 
| Returns the inverse scale parameter of the distribution.   | |
| param_type | param () const | 
| Returns the parameter set of the distribution.   | |
| void | param (const param_type &__param) | 
| Sets the parameter set of the distribution.   | |
| result_type | min () const | 
| Returns the greatest lower bound value of the distribution.   | |
| result_type | max () const | 
| Returns the least upper bound value of the distribution.   | |
| template<typename _UniformRandomNumberGenerator > | |
| result_type | operator() (_UniformRandomNumberGenerator &__urng) | 
| Generating functions.   | |
| typedef _RealType mx::math::laplace_distribution< _RealType >::result_type | 
The type of the range of the distribution.
Definition at line 147 of file randomT.hpp.
      
  | 
  inlineexplicit | 
Constructs a Laplace (double exponential) distribution with inverse scale parameter \(\lambda\).
Definition at line 177 of file randomT.hpp.
      
  | 
  inline | 
Returns the inverse scale parameter of the distribution.
Definition at line 197 of file randomT.hpp.
      
  | 
  inline | 
Returns the least upper bound value of the distribution.
Definition at line 230 of file randomT.hpp.
      
  | 
  inline | 
Returns the greatest lower bound value of the distribution.
Definition at line 222 of file randomT.hpp.
      
  | 
  inline | 
Generating functions.
Definition at line 239 of file randomT.hpp.
References mx::math::laplace_distribution< _RealType >::operator()(), and mx::math::laplace_distribution< _RealType >::param().
Referenced by mx::math::laplace_distribution< _RealType >::operator()().
      
  | 
  inline | 
Returns the parameter set of the distribution.
Definition at line 205 of file randomT.hpp.
Referenced by mx::math::laplace_distribution< _RealType >::operator()().
      
  | 
  inline | 
Sets the parameter set of the distribution.
| __param | The new parameter set of the distribution. | 
Definition at line 214 of file randomT.hpp.
References mx::math::six_fifths().
      
  | 
  inline | 
Resets the distribution state.
Has no effect on Laplace distributions.
Definition at line 190 of file randomT.hpp.