StatRandom::RandomHypGeometric Function

void RandomHypGeometric(const int M, const int K, const int N, TMtxVecInt *results, int Seed = - 1);

Hypergeometric distribution random generator.

#NameTypeDescription
1Mconst int
2Kconst int
3Nconst int
4resultsTMtxVecInt *
5Seed = - 1int
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
#include "MtxExprInt.h"
#include "Units.StatRandom.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Stats;
using namespace Dew::Stats::Units::StatRandom;

void Example()
{
    VectorInt r(2000);
    RandomHypGeometric(100,50,30,r, -1);
}
Declared in Dew::Stats::Units::StatRandom · Dew.Stats/Units.StatRandom.h · Cross-compiler