ISmHyperGeometricDistribution.N1

Fore Syntax

N1: Integer;

Fore.NET Syntax

N1: integer;

Description

The N1 property determines size of the entire population.

Comments

The property value must satisfy the conditions: 1 ≤ N ≤ N1 and 1 ≤ M ≤ N1. Where:

Fore Example

Add a link to the Stat system assembly.

Sub UserProc;
Var
    Distrib: ISmHyperGeometricDistribution;
    Values: Array Of Double;
    i: Integer;
    Cnt: Integer = 10;
Begin
    Distrib := New SmHyperGeometricDistribution.Create;
    Distrib.N1 := 10000;
    Distrib.N := 500;
    Distrib.M := 10;
    Values := Distrib.RandomVector(Cnt);
    For i := 0 To Cnt - 1 Do
        Debug.WriteLine(Values[i]);
    End For;
End Sub UserProc;

After executing the example the console window shows a sample of pseudo-random values from discrete hypergeometric distribution based on selected parameters.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Stat;

Public Shared Sub Main(Params: StartParams);
Var
    Distrib: ISmHyperGeometricDistribution;
    Values: System.Array;
    i: Integer;
    Cnt: Integer = 10;
Begin
    Distrib := New SmHyperGeometricDistribution.Create();
    Distrib.N1 := 10000;
    Distrib.N := 500;
    Distrib.M := 10;
    Values := Distrib.RandomVector(Cnt);
    For i := 0 To Cnt - 1 Do
        System.Diagnostics.Debug.WriteLine(Values[i]);
    End For;
End Sub;

See also:

ISmHyperGeometricDistribution