void RandomHypGeometric(Int32 M, Int32 K, Int32 N, TMtxVecInt results, Int32 Seed)
Hypergeometric distribution random generator.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | M | Int32 | |
| 2 | K | Int32 | |
| 3 | N | Int32 | |
| 4 | results | TMtxVecInt | source TVecInt or TMtxInt |
| 5 | Seed | Int32 |
Result: stored in self (calling object)
Remarks:
This routine generates Result.Length pseudo random numbers, using the hypergeometric distribution with parameters M (lot size), K (size of sampling) and N (marked elements in the lot). 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.RandomHypGeometric(100,50,30,r, -1);
}
}