#include <laplace.h>
Public Member Functions | |
laplace_distribution (double mean=0.0, double scale=1.0) | |
double | cdf (double x) const |
double | inverse_cdf (double p) const |
double | mean () const |
void | mean (double a) |
double | scale () const |
void | scale (double b) |
References:
NUM_NAMESPACE_BEGIN laplace_distribution::laplace_distribution | ( | double | m = 0.0 , |
|
double | s = 1.0 | |||
) |
Create a distribution with the given mean and scale values.
mean | the mean parameter. | |
scale | the scale parameter. |
m | the mean parameter. | |
s | the scale parameter. |
double laplace_distribution::cdf | ( | double | x | ) | const [virtual] |
The CDF for this distribution. This method returns P(X < x).
x | the value at which the CDF is evaluated. |
Implements continuous_distribution.
double laplace_distribution::inverse_cdf | ( | double | p | ) | const [virtual] |
The inverse CDF for this distribution. This method returns x such that, P(X < x) = p.
p | the cumulative probability. |
Implements continuous_distribution.
double laplace_distribution::mean | ( | ) | const |
Access the mean parameter.
void laplace_distribution::mean | ( | double | m | ) |
Modify the mean parameter.
a | the new mean value. |
double laplace_distribution::scale | ( | ) | const |
Access the scale parameter.
void laplace_distribution::scale | ( | double | s | ) |
Modify the scale parameter.
b | the new scale value. |