Example usage for com.google.common.math BigIntegerMath binomial

List of usage examples for com.google.common.math BigIntegerMath binomial

Introduction

In this page you can find the example usage for com.google.common.math BigIntegerMath binomial.

Prototype

public static BigInteger binomial(int n, int k) 

Source Link

Document

Returns n choose k , also known as the binomial coefficient of n and k , that is, n!

Usage

From source file:sk.gymy.seminar.persistence.SeminarImporter.java

public static String calculatePossibleSolutionSize(Groups groups) {
    int seminarN = groups.getSeminarList().size();
    int groupsN = groups.getN();
    int n = groupsN * seminarN;
    int k = seminarN;
    BigInteger possibleSolutionSize = BigIntegerMath.binomial(n, k);
    return getFlooredPossibleSolutionSize(possibleSolutionSize);
}