21 inline constexpr int SymIndex(
int i,
int j) {
return (j <= i) ? i * (1 + i) / 2 + j : j * (1 + j) / 2 + i; }
42 template<
size_t N,
typename T>
43 constexpr T
Horner(
const T* c,
const T&
x)
45 if constexpr (
N == 0) {
82 template<
size_t N,
typename T,
typename... Args>
83 constexpr T
Horner(
const T* c,
const T& x1, Args... xI)
85 if constexpr (
N == 0) {
89 constexpr size_t M =
sizeof...(Args) + 1;
constexpr size_t NofPolCoefficients(size_t N, size_t M)
Number of coefficients in a polynomial.
constexpr int SymIndex(int i, int j)
Get matrix element for a symmetrix matrix stored in a low-triangular array.
constexpr T Horner(const T *c, const T &x)
Horner's scheme for a 1D-polynomial estimation.
@ N
Do not fit the time component.