|
| | SparsePolynomial ()=default |
| | SparsePolynomial (const CoefType &coef) |
| | Construct a sparse polynomial with one constant monomial with given coefficient, that is a constant.
|
| | SparsePolynomial (const MonomialType &coef) |
| | Construct a sparse polynomial with a single monomial.
|
| | SparsePolynomial (const std::array< const Polynomial< CoefType > *, Dim > &polynomials) |
| | Construct a sparse polynomial as a tensor product of Dim 1D polynomials.
|
| CoefType | evaluate (const Eigen::Vector< CoefType, Dim > &point) const |
| CoefType | evaluate (const CoefType *point) const |
| template<std::size_t IntegralDim> |
| CoefType | integrateAndEvaluate (const datastructure::SimplexDataView< IntegralDim, true, CoefType, std::size_t > &monomial_integrals, const CoefType *val_ptr) const |
| CoefType | integrate (const datastructure::SimplexDataView< Dim, true, CoefType, std::size_t > &monomial_integrals) const |
| SparsePolynomial | derivative (std::size_t component) const |
| auto & | data () |
| const auto & | data () const |
| Eigen::Vector< SparsePolynomial, Dim > | gradient () const |
| void | updateMaxExp () |
| SparsePolynomial< Dim *3, IndexType, CoefType, IsScaled > | applyCartesianMapping () const |
| template<std::size_t PreDim, std::size_t PostDim> |
| SparsePolynomial< Dim+PreDim+PostDim, IndexType, CoefType, IsScaled > | liftDimension () const |
| void | permuteVariables (const std::array< std::size_t, Dim > &permutation) |
| template<typename U> |
| SparsePolynomial< Dim, IndexType, U, IsScaled > | to () const |
| | Cast the polynomial to a different underlying type.
|
| SparsePolynomial & | operator+= (const SparsePolynomial &other) |
| SparsePolynomial & | operator-= (const SparsePolynomial &other) |
| SparsePolynomial & | operator*= (const SparsePolynomial &other) |
| | Multiplication by another polynomial.
|
| SparsePolynomial & | operator*= (const CoefType &scalar) |
| CoefType | integrate (const datastructure::SimplexDataView< Dim, SimplexData, CoefType, std::size_t > &monomial_integrals) const |
| | Integrate the polynomial given the monomials integrals.
|
| SparsePolynomial< Dim, IndexType, CoefType, IsScaled > | primitive (std::size_t component) const |
| | Compute the primitive of the polynomial.
|
template<std::size_t Dim, typename IndexType, typename CoefType, bool IsScaled>
class vulpes::polynomial::SparsePolynomial< Dim, IndexType, CoefType, IsScaled >
Template class to represent and operate on polynomials in nD.
The class is able to handle also polynomials that are sum/difference of scaled monomials.
The monomials are stored in a SmallVector, ensuring static allocation for a small number of monomials.
This file contains the implementation of a polynomial class template that supports various operations, including addition, subtraction, multiplication, division, differentiation, integration, and more.
- Note
- The class is optimized for sparse storage, meaning that it is adapt to cases where most of the coefficients are zero.