forked from pz4kybsvg/Conception
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
308 B
15 lines
308 B
#pragma once
|
|
|
|
namespace drake {
|
|
namespace math {
|
|
|
|
/** Computes the binomial coefficient `n`-choose-`k` efficiently using a dynamic
|
|
programming recursion. https://en.wikipedia.org/wiki/Binomial_coefficient
|
|
|
|
@pre k >= 0
|
|
*/
|
|
int BinomialCoefficient(int n, int k);
|
|
|
|
} // namespace math
|
|
} // namespace drake
|