Discrete Distribution<T> Constructor
Definition
Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Discrete | Constructs a new DiscreteDistribution<T> object. |
Discrete | Constructs a new DiscreteDistribution<T> object. |
DiscreteDistribution<T>(Histogram<T>)
Constructs a new DiscreteDistribution<T> object.
public DiscreteDistribution(
Histogram<T> values
)
Parameters
Exceptions
Argument | values is null. |
Argument | values has zero length. -or- One or more of the relative probabilities is less than zero. -or- One or more of the relative probabilities is not a finite number. -or- All relative probabilities are zero. |
DiscreteDistribution<T>(IList<T>, IList<Double>)
Constructs a new DiscreteDistribution<T> object.
public DiscreteDistribution(
IList<T> items,
IList<double> probabilities
)
Parameters
Exceptions
Argument | items is null. -or- probabilities is null. |
Dimension | The length of items is not equal to the length of probabilities. |
Argument | items and probabilities have zero length. -or- One or more of the relative probabilities is less than zero. -or- One or more of the relative probabilities is not a finite number. -or- All relative probabilities are zero. |