Laplacian distribution. More...
#include <itpp/base/random.h>
Public Member Functions | |
Laplace_RNG (double meanval=0.0, double variance=1.0) | |
Constructor. Set mean and variance. More... | |
void | setup (double meanval, double variance) |
Set mean and variance. More... | |
void | get_setup (double &meanval, double &variance) const |
Get mean and variance. More... | |
double | operator() () |
Get one sample. More... | |
vec | operator() (int n) |
Get a sample vector. More... | |
mat | operator() (int h, int w) |
Get a sample matrix. More... | |
double | sample () |
Returns a single sample. More... | |
itpp::Laplace_RNG::Laplace_RNG | ( | double | meanval = 0.0 , |
double | variance = 1.0 |
||
) |
Constructor. Set mean and variance.
Definition at line 725 of file random.cpp.
References setup(), and itpp::variance().
void itpp::Laplace_RNG::setup | ( | double | meanval, |
double | variance | ||
) |
Set mean and variance.
Definition at line 730 of file random.cpp.
References itpp::sqrt(), and itpp::variance().
Referenced by Laplace_RNG().
void itpp::Laplace_RNG::get_setup | ( | double & | meanval, |
double & | variance | ||
) | const |
|
inline |
vec itpp::Laplace_RNG::operator() | ( | int | n | ) |
mat itpp::Laplace_RNG::operator() | ( | int | h, |
int | w | ||
) |
|
inline |
Returns a single sample.
Definition at line 561 of file random.h.
References itpp::log(), and itpp::mean().
Referenced by operator()().
Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.4