IMath.Multinomial

Fore Syntax

Multinomial(Values: Array): Double;

Fore.NET Syntax

Multinomial(Values: System.Array): double;

Parameters

Values. Array of integer numbers.

Description

The Multinominal method returns the ratio of the factorial of the sum of values to the factorials product.

Comments

The value of each element of the array must be in [0;170] interval.

It is required to use an array of value of the Integer type.

The function works correctly with both one-dimension and two-dimension arrays.

Fore Example

To execute the example, add a link to the MathFin system assembly.

Sub UserProc;
Var
    r: Double;
    Arr: Array[3Of Integer;
Begin
    Arr[0] := 2;
    Arr[1] := 3;
    Arr[2] := 4;
    r := Math.Multinomial(Arr);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the relation result equal to 1260.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    r: Double;
    Math: MathClass = New MathClass();
    Arr: Array[3Of Integer;
Begin
    Arr[0] := 2;
    Arr[1] := 3;
    Arr[2] := 4;
    r := Math.Multinomial(Arr);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IMath