void RandomNegBinom(Double R, Double p, TMtxVecInt results, Int32 Seed)
Negative binomial distribution random generator.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | R | Double | scalar |
| 2 | p | Double | scalar |
| 3 | results | TMtxVecInt | source TVecInt or TMtxInt |
| 4 | Seed | Int32 |
Result: stored in self (calling object)
Remarks:
This routine generates Result.Length pseudo random numbers, using the hypergeometric distribution with parameters M, K and N. The random numbers are stored in the Results vector. An exception is raised if Result vector is complex.
Examples
using Dew.Math;
using Dew.Stats.Units;
namespace Dew.Examples
{
private void Example()
{
VectorInt r = new VectorInt(2000);
StatRandom.RandomNegBinom(10,0.2,r, -1);
}
}