Package org.nevec.rjm

Class Factorial


  • public class Factorial
    extends java.lang.Object
    Factorials.
    Since:
    2006-06-25, 2012-02-15 Storage of the values based on Ifactor, not BigInteger.
    Author:
    Richard J. Mathar
    • Constructor Summary

      Constructors 
      Constructor Description
      Factorial()
      ctor().
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.math.BigInteger at​(int n)
      Compute the factorial of the non-negative integer.
      Ifactor toIfactor​(int n)
      Compute the factorial of the non-negative integer.
      • Methods inherited from class java.lang.Object

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

      • Factorial

        public Factorial()
        ctor(). Initialize the vector of the factorials with 0!=1 and 1!=1.
    • Method Detail

      • at

        public java.math.BigInteger at​(int n)
        Compute the factorial of the non-negative integer.
        Parameters:
        n - the argument to the factorial, non-negative.
        Returns:
        the factorial of n.
      • toIfactor

        public Ifactor toIfactor​(int n)
        Compute the factorial of the non-negative integer.
        Parameters:
        n - the argument to the factorial, non-negative.
        Returns:
        the factorial of n.