The distribution is parameterized by a vector of ratios: in other words, the parameter does not have to be normalized and sum to 1. The reason is that some vectors can't be exactly normalized to sum to 1 in floating point representation.
Double[]
probabilityMassAn array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.
Random
randomSourceThe random number generator which is used to draw random samples.
Double[]
probabilityMassAn array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.
Double[]
probabilityMassAn array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.
double
xThe location at which to compute the cumulative distribution function.
double
the cumulative distribution at location x.
Double[]
probabilityMassAn array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.
double
probabilityA real number between 0 and 1.
int
An integer between 0 and the size of the categorical (exclusive), that corresponds to the inverse CDF for the given probability.
Double[]
cdfUnnormalizedAn array corresponding to a CDF for a categorical distribution. Not assumed to be normalized.
double
probabilityA real number between 0 and 1.
int
An integer between 0 and the size of the categorical (exclusive), that corresponds to the inverse CDF for the given probability.
Double[]
cdfAn array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.
bool
If any of the probabilities are negative returns false
, or if the sum of parameters is 0.0; otherwise true
Double[]
pAn array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.
bool
If any of the probabilities are negative returns false
, or if the sum of parameters is 0.0; otherwise true
Double[]
probabilityMassAn array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.
int
kThe location in the domain where we want to evaluate the probability mass function.
double
the probability mass at location k.
Double[]
probabilityMassAn array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.
int
kThe location in the domain where we want to evaluate the log probability mass function.
double
the log probability mass at location k.
Double[]
probabilityMassAn array of nonnegative ratios. Not assumed to be normalized.
int
One random integer between 0 and the size of the categorical (exclusive).
Random
rndThe random number generator to use.
Double[]
probabilityMassAn array of nonnegative ratios. Not assumed to be normalized.
int
One random integer between 0 and the size of the categorical (exclusive).
Random
rndThe random number generator to use.
Double[]
probabilityMassAn array of nonnegative ratios. Not assumed to be normalized.
IEnumerable<int>
random integers between 0 and the size of the categorical (exclusive).
Double[]
probabilityMassAn array of nonnegative ratios. Not assumed to be normalized.
IEnumerable<int>
random integers between 0 and the size of the categorical (exclusive).
Random
rndThe random number generator to use.
Int32[]
valuesThe array to fill with the samples.
Double[]
probabilityMassAn array of nonnegative ratios. Not assumed to be normalized.
void
random integers between 0 and the size of the categorical (exclusive).
Int32[]
valuesThe array to fill with the samples.
Double[]
probabilityMassAn array of nonnegative ratios. Not assumed to be normalized.
void
random integers between 0 and the size of the categorical (exclusive).
Random
rndThe random number generator to use.
Double[]
cdfUnnormalizedAn array of the cumulative distribution. Not assumed to be normalized.
IEnumerable<int>
random integers between 0 and the size of the categorical (exclusive).
Random
rndThe random number generator to use.
Int32[]
valuesThe array to fill with the samples.
Double[]
cdfUnnormalizedAn array of the cumulative distribution. Not assumed to be normalized.
void
random integers between 0 and the size of the categorical (exclusive).
Double[]
cdfUnnormalizedAn array of the cumulative distribution. Not assumed to be normalized.
IEnumerable<int>
random integers between 0 and the size of the categorical (exclusive).
Int32[]
valuesThe array to fill with the samples.
Double[]
cdfUnnormalizedAn array of the cumulative distribution. Not assumed to be normalized.
void
random integers between 0 and the size of the categorical (exclusive).
Random
rndThe random number generator to use.
Double[]
cdfUnnormalizedAn array of the cumulative distribution. Not assumed to be normalized.
int
One random integer between 0 and the size of the categorical (exclusive).
Double[]
cdfUnnormalizedAn array of the cumulative distribution. Not assumed to be normalized.
int
One random integer between 0 and the size of the categorical (exclusive).
double
xThe location at which to compute the cumulative distribution function.
double
the cumulative distribution at location x.
double
probabilityA real number between 0 and 1.
int
An integer between 0 and the size of the categorical (exclusive), that corresponds to the inverse CDF for the given probability.
int
kThe location in the domain where we want to evaluate the probability mass function.
double
the probability mass at location k.
int
kThe location in the domain where we want to evaluate the log probability mass function.
double
the log probability mass at location k.
int
The number of successful trials.
IEnumerable<int>
a sequence of successful trial counts.
string
a string representation of the distribution.
Throws a NotSupportedException.
Sometimes the normalized probability vector cannot be represented exactly in a floating point representation.
Throws a NotSupportedException.