DiscreteDistribution<T> Constructor

Definition

Namespace: Extreme.Statistics.Distributions
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

DiscreteDistribution<T>(Histogram<T>)

Constructs a new DiscreteDistribution<T> object.
C#
public DiscreteDistribution(
	Histogram<T> values
)

Parameters

values  Histogram<T>
A histogram containing the relative probabilities.

Exceptions

ArgumentNullException

values is null.

ArgumentException

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.
C#
public DiscreteDistribution(
	IList<T> items,
	IList<double> probabilities
)

Parameters

items  IList<T>
 
probabilities  IList<Double>
 

Exceptions

ArgumentNullException

items is null.

-or-

probabilities is null.

DimensionMismatchException

The length of items is not equal to the length of probabilities.

ArgumentException

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.

See Also