11#ifndef QUGAR_IMPL_POLYNOMIAL_TP_HPP
12#define QUGAR_IMPL_POLYNOMIAL_TP_HPP
40 using CoefsType = std::conditional_t<range == 1, real, Point<range>>;
81 [[nodiscard]]
const std::vector<CoefsType> &
get_coefs()
const;
Definition of Cartesian bounding box class.
Class representing a dim-dimensional Cartesian product bounding box.
Definition bbox.hpp:38
Class representing a dim-dimensional tensor-product indices.
Definition tensor_index_tp.hpp:95
Class representing a dim-dimensional tensor-product sizes container.
Definition tensor_index_tp.hpp:38
Domain functions.
Definition domain_function.hpp:41
Base class for tensor-product polynomial functions.
Definition polynomial_tp.hpp:37
PolynomialTP(const TensorSizeTP< dim > &order, const std::vector< CoefsType > &coefs)
Constructor.
const CoefsType & get_coef(int index) const
Retrieves the coefficients at the specified index.
PolynomialTP(const TensorSizeTP< dim > &order, const CoefsType &value)
Constructs a constant value PolynomialTP object with the specified order.
int get_degree(int dir) const
Gets the polynomial degree (order - 1) along the direction dir.
std::conditional_t< range==1, real, Point< range > > CoefsType
Coefs type.
Definition polynomial_tp.hpp:40
std::vector< CoefsType > coefs_
Definition polynomial_tp.hpp:70
CoefsType & get_coef(const TensorIndexTP< dim > &index)
Retrieves the coefficient associated with the given tensor index.
const std::vector< CoefsType > & get_coefs() const
Gets the polynomial coefficients.
PolynomialTP(const TensorSizeTP< dim > &order)
Constructor.
void coefs_linear_transform(const real scale, const CoefsType &shift)
Applies a linear transformation to every coefficient.
CoefsType & get_coef(int index)
Retrieves the coefficients at the specified index.
const TensorSizeTP< dim > & get_order() const
Gets the polynomial order along the parametric directions.
const CoefsType & get_coef(const TensorIndexTP< dim > &index) const
Retrieves the coefficient associated with the given tensor index.
TensorSizeTP< dim > order_
Order of the polynomial along each parametric direction.
Definition polynomial_tp.hpp:65
int get_order(int dir) const
Gets the polynomial order (degree + 1) along the direction dir.
std::size_t get_num_coefs() const
Get the number of coeficients.
void transform_image(const BoundBox< range > &old_domain, const BoundBox< range > &new_domain)
Transforms (in place) the coefficients of the polynomial from old_domain to new_domain.
Declaration of a few implicit functions template class ready to be consumed by Algoim.
Definition affine_transf.hpp:28
double real
Definition types.hpp:18
std::ptrdiff_t index
Definition types.hpp:19
Definition and implementation of Point class.
Declaration of tensor-product index and size related classes.