GenericDiscreteDistribution Constructor

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

GenericDiscreteDistribution(Double[])

Constructs a new GenericDiscreteDistribution object.
C#
public GenericDiscreteDistribution(
	double[] relativeFrequencies
)

Parameters

relativeFrequencies  Double[]
A Double array containing the relative frequency of the numbers starting from zero.

Remarks

The first element of relativeFrequencies contains the relative frequency that the value 0 will occur.

The relative frequencies do not need to add up to 1.

Exceptions

ArgumentNullException

relativeFrequencies is null.

ArgumentException

One or more of the frequencies in relativeFrequencies is negative.

GenericDiscreteDistribution(Int32, Double[])

Constructs a new GenericDiscreteDistribution object.
C#
public GenericDiscreteDistribution(
	int offset,
	double[] relativeFrequencies
)

Parameters

offset  Int32
The first value for which the probability is not zero.
relativeFrequencies  Double[]
A Double array containing the relative frequency of the numbers starting from offset.

Remarks

The first element of relativeFrequencies contains the relative frequency that the value offset will occur.

The relative frequencies do not need to add up to 1.

Exceptions

ArgumentNullException

relativeFrequencies is null.

ArgumentException

One or more of the frequencies in relativeFrequencies is negative.

See Also