Class Stirling


  • public class Stirling
    extends Object
    Computation of Stirling numbers.
    Author:
    Tilman Neumann
    • Constructor Detail

      • Stirling

        public Stirling()
    • Method Detail

      • stirling1

        public static BigInteger stirling1​(int n,
                                           int k)
        (Signed) Stirling numbers of the first kind.
        Parameters:
        n - Upper parameter
        k - Lower parameter
        Returns:
        s(n,k)
      • absStirling1

        public static BigInteger absStirling1​(int n,
                                              int k)
        Absolute Stirling numbers of the first kind.
        Parameters:
        n - Upper parameter
        k - Lower parameter
        Returns:
        |s(n,k)|
      • rStirling1

        public static BigInteger rStirling1​(int n,
                                            int k,
                                            int r)
        Compute r-Stirling numbers of the first kind s(n,k,r)
        Parameters:
        n - Upper parameter
        k - Lower parameter
        r - r-value
        Returns:
        s(n,k,r)
      • stirling1Diag

        public static BigInteger[] stirling1Diag​(int n,
                                                 int k)
        Calculates the diagonal of Stirling numbers of the first kind S1(n-k+1,1), S1(n-k+2,2), ..., S1(n-1,k-1), S1(n,k).
        Parameters:
        n -
        k -
        Returns:
        an array containing the Stirling numbers of the diagonal
      • nextStirling1Diag

        public static BigInteger[] nextStirling1Diag​(BigInteger[] lastDiag,
                                                     int n1,
                                                     int k)
      • main

        public static void main​(String[] args)
        Tests.
        Parameters:
        args - ignored