Class Moment_stirling2

java.lang.Object
jline.api.moment.Moment_stirling2

public final class Moment_stirling2 extends Object
Triangle of the Stirling numbers of the second kind.

Builds the triangle of the Stirling numbers of the second kind S(i,j), implicitly defined by the expansion of a power into falling factorials

   x^i = sum_{j=0}^{i} S(i,j) x(x-1)(x-2)...(x-j+1)
 

and computed from the recursion

   S(i,j) = j*S(i-1,j) + S(i-1,j-1)   for j > 0
   S(0,0) = 1,   S(i,0) = 0 for i > 0
 

These numbers are the coefficients that convert factorial moments back into power moments.

Reference: A. Heindl and A. van de Liefvoort. Moment conversions for discrete distributions. PMCCS, 2003, eq. (11).

Since:
LINE 3.0
  • Method Details

    • moment_stirling2

      public static Matrix moment_stirling2(int n)
      Triangle of the Stirling numbers of the second kind S(i,j).
      Parameters:
      n - maximum order (n >= 0)
      Returns:
      (n+1)x(n+1) matrix with element (i,j) holding S(i,j) in the 0-based notation of the reference; entries with j > i are zero
      Throws:
      IllegalArgumentException - if n is negative