|
C(++)ECCO
C++ Error Control COding: a header-only library for ECC simulations and experiments, modeling complete coding systems across arbitrary finite fields and complex inter-field relationships - Christian Senger <senger@inue.uni-stuttgart.de>
|
Sierpinski triangle (Pascal's triangle modulo p). More...
#include <helpers.hpp>
Public Member Functions | |
| SierpinskiTriangle (size_t n_max, size_t k_max, size_t p) | |
| Precompute C(n,k) mod p for all n <= n_max and k <= k_max. | |
| size_t | operator() (size_t n, size_t k) const |
| C(n,k) mod p, zero whenever k > n (even beyond the precomputed range) | |
Sierpinski triangle (Pascal's triangle modulo p).
Provides binomial coefficients C(n,k) mod p without overflow or multi-precision arithmetic.
Definition at line 330 of file helpers.hpp.
|
inline |
Precompute C(n,k) mod p for all n <= n_max and k <= k_max.
| std::invalid_argument | if p is zero |
Definition at line 336 of file helpers.hpp.


|
inline |
C(n,k) mod p, zero whenever k > n (even beyond the precomputed range)
| std::invalid_argument | if k <= n and n > n_max or k > k_max |
Definition at line 349 of file helpers.hpp.