44template <
index_type PolynomialDegree, base::concepts::real_scalar Variable,
45 base::concepts::dense_matrix_of<Variable> Matrix>
46 requires(PolynomialDegree >= 0)
48 const std::vector<Variable>& variables, Matrix& matrix) {
50 calculator.prepare(1);
51 calculator.compute_polynomial_term_matrix(variables, matrix);
65 requires(PolynomialDegree >= 0)
67 const std::vector<Variable>& variables, Matrix& matrix) {
69 PolynomialDegree < 2,
"Currently, up to 1 degree is supported.");
71 using scalar_type =
typename Matrix::Scalar;
73 const auto num_variables =
static_cast<index_type>(variables.size());
75 const auto num_dimensions = variables.front().size();
77 polynomial_calculator<Variable, PolynomialDegree> calculator;
78 calculator.prepare(num_dimensions);
79 calculator.compute_polynomial_term_matrix(variables, matrix);
Class to calculate polynomials used with RBF interpolation.
Concept of Eigen's dense matrices with scalars of the given type.
Concept of Eigen's dense vectors.
Definition of dense_matrix_of concept.
Definition of dense_vector concept.
Definition of exceptions.
Definition of index_type type.
Definition of macros for logging.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of RBF interpolation.
void compute_polynomial_term_matrix(const std::vector< Variable > &variables, Matrix &matrix)
Compute a matrix of polynomial terms in RBF interpolation.
Definition of polynomial_calculator class.
Definition of NUM_COLLECT_PRECONDITION macro.
#define NUM_COLLECT_PRECONDITION(CONDITION,...)
Check whether a precondition is satisfied and throw an exception if not.
Definition of real_scalar concept.