Namespaces

Types in MathNet.Numerics.Distributions

Type IDiscreteDistribution

Namespace MathNet.Numerics.Distributions

Interfaces IUnivariateDistribution

Discrete Univariate Probability Distribution.

Methods

Properties

Public Methods

double Probability(int k)

Computes the probability mass (PMF) at k, i.e. P(X = k).
Parameters
int k

The location in the domain where we want to evaluate the probability mass function.

Return
double

the probability mass at location k.

double ProbabilityLn(int k)

Computes the log probability mass (lnPMF) at k, i.e. ln(P(X = k)).
Parameters
int k

The location in the domain where we want to evaluate the log probability mass function.

Return
double

the log probability mass at location k.

int Sample()

Draws a random sample from the distribution.
Return
int

a sample from the distribution.

void Samples(Int32[] values)

Fills an array with samples generated from the distribution.

IEnumerable<int> Samples()

Draws a sequence of random samples from the distribution.
Return
IEnumerable<int>

an infinite sequence of samples from the distribution.

Public Properties

int Maximum get;

Gets the largest element in the domain of the distribution which can be represented by an integer.

int Minimum get;

Gets the smallest element in the domain of the distribution which can be represented by an integer.

int Mode get;

Gets the mode of the distribution.