Constructs a random number generator for a discrete negative binomial distribution using the specified number of failures before stopping and probability of success on each trial.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public IntRandomNegativeBinomialDistribution(
	int failures,
	double probability
)
Visual Basic (Declaration)
Public Sub New ( _
	failures As Integer, _
	probability As Double _
)
Visual C++
public:
IntRandomNegativeBinomialDistribution(
	int failures, 
	double probability
)

Parameters

failures
Type: System..::.Int32
Target for number of successful trials.
probability
Type: System..::.Double
The probability of success on each trial.

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.InvalidArgumentExceptionThrown if size less than 0 or probability less than 0 or greater than 1.

See Also