#include <geometric.h>

Public Member Functions | |
| geometric_distribution (double p=0.5) | |
| double | cdf (int x) const |
| int | inverse_cdf (double p) const |
| double | pmf (int x) const |
| double | probability_of_success () const |
| void | probability_of_success (double p) |
References:
| NUM_NAMESPACE_BEGIN geometric_distribution::geometric_distribution | ( | double | p = 0.5 |
) |
Create a distribution with the given probability of success.
| p | the probability of success. |
| double geometric_distribution::cdf | ( | int | x | ) | const [virtual] |
The CDF for this distribution. This method returns P(X x).
| x | the value at which the CDF is evaluated. |
Implements discrete_distribution.
| int geometric_distribution::inverse_cdf | ( | double | p | ) | const [virtual] |
The inverse CDF for this distribution. This method returns the largest x such that, P(X x) p.
| p | the cumulative probability. |
| p | the cumulative probability. |
Implements discrete_distribution.
| double geometric_distribution::pmf | ( | int | x | ) | const [virtual] |
The PMF for this distribution. This method returns P(X = x).
| x | the value at which the PMF is evaluated. |
Implements discrete_distribution.
| double geometric_distribution::probability_of_success | ( | ) | const |
Access the probability of success.
| void geometric_distribution::probability_of_success | ( | double | p | ) |
Modify the probability of success.
| p | the new probability of success. |
| df | the new probability of success. |
1.5.3