Multinomial(Values: Array): Double;
Multinomial(Values: System.Array): double;
Values. Array of integer numbers.
The Multinominal method returns the ratio of the factorial of the sum of values to the factorials product.
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.
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Arr: Array[3] Of 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.
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[3] Of Integer;
Begin
Arr[0] := 2;
Arr[1] := 3;
Arr[2] := 4;
r := Math.Multinomial(Arr);
System.Diagnostics.Debug.WriteLine(r);
End Sub;
See also: