GenericDiscreteDistribution Constructor

Definition

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

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

ArgumentNullExceptionrelativeFrequencies is null.
ArgumentExceptionOne 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

ArgumentNullExceptionrelativeFrequencies is null.
ArgumentExceptionOne or more of the frequencies in relativeFrequencies is negative.

See Also