The base of all monomial containers.
More...
#include <Polynomials.hpp>
template<class exp_t>
class symmp::BaseContainer< exp_t >
The base of all monomial containers.
- Template Parameters
-
exp_t | The variable/exponent type of the monomials |
- Attention
exp_t
must have functionality similar to StandardVariables
, ElementarySymmetricVariables
, HalfIdempotentVariables
or TwistedChernVariables
. Specifically:
- It must have a typedef
deg_t
that represents the degree type (eg int, size_t
)
- It must have basic vector functionality (easiest way is to inherit from
std::vector<size_t>
)
- It should have operators + and - to be used in the product/division of monomials
- Optionally, it may have a
deg_t degree() const
method that computes the degree of the monomial exponent
- Warning
- If
exp_t
does not have a degree
method then the dimensions of the variables must be provided through a valid deg_t* dimensions
in the constructor
- Todo:
- Use concepts (C++20) to express the requirements from
exp_t
◆ BaseContainer()
Constructor given pointer to dimensions of the variables.
- Parameters
-
dimensions | Used only when exp_t does not implement method deg_t degree() const |
◆ compute_degree()
deg_t compute_degree |
( |
const exp_t & |
exponent | ) |
const |
|
protected |
Computes degree of given exponent.
- Note
- Calls
typename exp_t::degree()
if that method exists, otherwise uses dimensions
- Warning
- If neither dimensions is set nor
typename exp_t::degree()
exists then this function calls abort()
◆ dimensions
The pointer to the dimensions of the variables.
The documentation for this class was generated from the following file: