Codota Logo
MathUtils.binomialCoefficientLog
Code IndexAdd Codota to your IDE (free)

How to use
binomialCoefficientLog
method
in
org.matheclipse.parser.client.math.MathUtils

Best Java code snippets using org.matheclipse.parser.client.math.MathUtils.binomialCoefficientLog (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.refcodes/refcodes-criteria

/**
 * Returns a <code>double</code> representation of the
 * <a href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial
 * Coefficient</a>, "<code>n choose k</code>", the number of
 * <code>k</code>-element subsets that can be selected from an
 * <code>n</code>-element set.
 * 
 * <Strong>Preconditions</strong>:
 * <ul>
 * <li><code>0 &lt;= k &lt;= n </code> (otherwise
 * <code>IllegalArgumentException</code> is thrown)</li>
 * <li>The result is small enough to fit into a <code>double</code>. The
 * largest value of <code>n</code> for which all coefficients are &lt;
 * Double.MAX_VALUE is 1029. If the computed value exceeds Double.MAX_VALUE,
 * Double.POSITIVE_INFINITY is returned</li>
 * </ul>
 * 
 * @param n the size of the set
 * @param k the size of the subsets to be counted
 * @return <code>n choose k</code>
 * @throws java.lang.IllegalArgumentException if preconditions are not met.
 */
public static double binomialCoefficientDouble( final int n, final int k ) {
  return Math.floor( Math.exp( binomialCoefficientLog( n, k ) ) + 0.5 );
}
origin: axkr/symja_android_library

/**
 * Returns a <code>double</code> representation of the <a
 * href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial
 * Coefficient</a>, "<code>n choose k</code>", the number of
 * <code>k</code>-element subsets that can be selected from an
 * <code>n</code>-element set.
 * <p>
 * <Strong>Preconditions</strong>:
 * <ul>
 * <li> <code>0 <= k <= n </code> (otherwise
 * <code>IllegalArgumentException</code> is thrown)</li>
 * <li> The result is small enough to fit into a <code>double</code>. The
 * largest value of <code>n</code> for which all coefficients are <
 * Double.MAX_VALUE is 1029. If the computed value exceeds Double.MAX_VALUE,
 * Double.POSITIVE_INFINITY is returned</li>
 * </ul>
 * </p>
 * 
 * @param n
 *          the size of the set
 * @param k
 *          the size of the subsets to be counted
 * @return <code>n choose k</code>
 * @throws IllegalArgumentException
 *           if preconditions are not met.
 */
public static double binomialCoefficientDouble(final int n, final int k) {
  return Math.floor(Math.exp(binomialCoefficientLog(n, k)) + 0.5);
}
origin: org.appdapter/ext.bundle.math.symja_jas

/**
 * Returns a <code>double</code> representation of the <a
 * href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial
 * Coefficient</a>, "<code>n choose k</code>", the number of
 * <code>k</code>-element subsets that can be selected from an
 * <code>n</code>-element set.
 * <p>
 * <Strong>Preconditions</strong>:
 * <ul>
 * <li> <code>0 <= k <= n </code> (otherwise
 * <code>IllegalArgumentException</code> is thrown)</li>
 * <li> The result is small enough to fit into a <code>double</code>. The
 * largest value of <code>n</code> for which all coefficients are <
 * Double.MAX_VALUE is 1029. If the computed value exceeds Double.MAX_VALUE,
 * Double.POSITIVE_INFINITY is returned</li>
 * </ul>
 * </p>
 * 
 * @param n
 *          the size of the set
 * @param k
 *          the size of the subsets to be counted
 * @return <code>n choose k</code>
 * @throws IllegalArgumentException
 *           if preconditions are not met.
 */
public static double binomialCoefficientDouble(final int n, final int k) {
  return Math.floor(Math.exp(binomialCoefficientLog(n, k)) + 0.5);
}
org.matheclipse.parser.client.mathMathUtilsbinomialCoefficientLog

Javadoc

Returns the natural log of the Binomial Coefficient, "n choose k", the number of k-element subsets that can be selected from an n-element set.

Preconditions:

  • 0 (otherwise IllegalArgumentException is thrown)

Popular methods of MathUtils

  • addAndCheck
    Add two long integers, checking for overflow.
  • binomialCoefficientDouble
    Returns a double representation of the Binomial Coefficient [http://mathworld.wolfram.com/BinomialCo
  • cosh
    Returns the hyperbolic cosine [http://mathworld.wolfram.com/HyperbolicCosine.html] of x.
  • equals
    Returns true iff both arguments are null or have same dimensions and all their elements are #equals(
  • factorialDouble
    Returns n!. Shorthand for n Factorial [http://mathworld.wolfram.com/Factorial.html], the product of
  • factorialLog
    Returns the natural logarithm of n!.Preconditions: * n >= 0 (otherwiseIllegalArgumentException is th
  • gcd
    Gets the greatest common divisor of the absolute value of two numbers, using the "binary gcd" method
  • hash
    Returns an integer hash code representing the given double array value.
  • indicator
    For a short value x, this method returns (short)(+1) if x >= 0 and (short)(-1) if x < 0.
  • mulAndCheck
    Multiply two long integers, checking for overflow.
  • sinh
    Returns the hyperbolic sine [http://mathworld.wolfram.com/HyperbolicSine.html] of x.
  • sinh

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now