Package pal.math

Class Binomial

  • All Implemented Interfaces:
    java.io.Serializable

    public class Binomial
    extends java.lang.Object
    implements java.io.Serializable
    Binomial coefficients
    Version:
    $Id: Binomial.java,v 1.6 2001/07/13 14:39:13 korbinian Exp $
    Author:
    Korbinian Strimmer
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Binomial()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double choose​(double n, double k)
      Binomial coefficient n choose k
      double getNChoose2​(int n)
      get (precomputed) n choose 2
      void setMax​(int max)
      set capacity and precompute the n choose 2 values
      • Methods inherited from class java.lang.Object

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

      • Binomial

        public Binomial()
    • Method Detail

      • choose

        public double choose​(double n,
                             double k)
        Binomial coefficient n choose k
      • getNChoose2

        public double getNChoose2​(int n)
        get (precomputed) n choose 2
      • setMax

        public void setMax​(int max)
        set capacity and precompute the n choose 2 values