Class Stirling

java.lang.Object
de.tilman_neumann.jml.combinatorics.Stirling

public class Stirling
extends java.lang.Object
Computation of Stirling numbers.
  • Constructor Summary

    Constructors
    Constructor Description
    Stirling()  
  • Method Summary

    Modifier and Type Method Description
    static java.math.BigInteger absStirling1​(int n, int k)
    Absolute Stirling numbers of the first kind.
    static void main​(java.lang.String[] args)
    Tests.
    static java.math.BigInteger[] nextStirling1Diag​(java.math.BigInteger[] lastDiag, int n1, int k)  
    static java.math.BigInteger rStirling1​(int n, int k, int r)
    Compute r-Stirling numbers of the first kind s(n,k,r)
    static java.math.BigInteger stirling1​(int n, int k)
    (Signed) Stirling numbers of the first kind.
    static java.math.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).
    static java.math.BigInteger stirling2​(int n, int k)
    Stirling numbers of the second kind S(n,k).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Stirling

      public Stirling()
  • Method Details

    • stirling1

      public static java.math.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 java.math.BigInteger absStirling1​(int n, int k)
      Absolute Stirling numbers of the first kind.
      Parameters:
      n - Upper parameter
      k - Lower parameter
      Returns:
      |s(n,k)|
    • stirling2

      public static java.math.BigInteger stirling2​(int n, int k)
      Stirling numbers of the second kind S(n,k).
      Parameters:
      n -
      k -
      Returns:
      BigInt
      See Also:
      http://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html
    • rStirling1

      public static java.math.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 java.math.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 java.math.BigInteger[] nextStirling1Diag​(java.math.BigInteger[] lastDiag, int n1, int k)
    • main

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