binomial coefficient gamma
Computes the binomial coefficient with the given arguments.
Controller: CodeCogs
Dependents
Interface
C++
Excel
Binomial Coefficient Gamma
intbinomial_coefficient_gamma( | int | n | |
int | k | ) |
Example:
#include <codecogs/maths/combinatorics/arithmetic/binomial_coefficient_gamma.h> #include <iostream> int main() { for (int i = 0; i <= 6; i++) { std::cout << "C(6, " << i << ") = "; std::cout << Maths::Combinatorics::Arithmetic::binomial_coefficient_gamma(6, i); std::cout << std::endl; } return 0; }
Output:
C(6, 0) = 1 C(6, 1) = 6 C(6, 2) = 15 C(6, 3) = 20 C(6, 4) = 15 C(6, 5) = 6 C(6, 6) = 1
References:
SUBSET, a C++ library of combinatorial routines, http://www.csit.fsu.edu/~burkardt/cpp_src/subset/subset.htmlParameters
n the first combinatorial parameter k the second combinatorial parameter
Returns
- the binomial coefficients with parameters n and k
Authors
- Lucian Bentea (August 2005)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.