Skip to content

Commit

Permalink
Readying.
Browse files Browse the repository at this point in the history
  • Loading branch information
pleroy committed Dec 31, 2023
1 parent ee64c05 commit 5dcb5b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions numerics/combinatorics_body.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ constexpr std::int64_t Binomial(std::int64_t const n, std::int64_t const k) {
return FallingFactorial(n, k) / Factorial(k);
}

constexpr std::int64_t DoubleFactorial(std::int64_t n) {
constexpr std::int64_t DoubleFactorial(std::int64_t const n) {
std::int64_t result = 1;
for (std::int64_t i = n; i >= 1; i -= 2) {
result *= i;
}
return result;
}

constexpr std::int64_t Factorial(std::int64_t n) {
constexpr std::int64_t Factorial(std::int64_t const n) {
return FallingFactorial(n, n);
}

Expand All @@ -34,7 +34,8 @@ constexpr std::int64_t FallingFactorial(std::int64_t const n,
return result;
}

constexpr std::int64_t KroneckerDelta(std::int64_t i, std::int64_t j) {
constexpr std::int64_t KroneckerDelta(std::int64_t const i,
std::int64_t const j) {
return i == j;
}

Expand Down

0 comments on commit 5dcb5b1

Please sign in to comment.