Symmetric Polynomials  V3.1
A C++ library for generating symmetric polynomials with relations
BaseContainer< exp_t > Class Template Reference

The base of all monomial containers. More...

#include <Polynomials.hpp>

Inheritance diagram for BaseContainer< exp_t >:
[legend]

Protected Member Functions

 BaseContainer (const deg_t *dimensions=nullptr)
 Constructor given pointer to dimensions of the variables. More...
 
deg_t compute_degree (const exp_t &exponent) const
 Computes degree of given exponent. More...
 

Protected Attributes

const deg_t * dimensions
 The pointer to the dimensions of the variables. More...
 

Detailed Description

template<class exp_t>
class symmp::BaseContainer< exp_t >

The base of all monomial containers.

Template Parameters
exp_tThe 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

Constructor & Destructor Documentation

◆ BaseContainer()

BaseContainer ( const deg_t *  dimensions = nullptr)
protected

Constructor given pointer to dimensions of the variables.

Parameters
dimensionsUsed only when exp_t does not implement method deg_t degree() const

Member Function Documentation

◆ 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()

Member Data Documentation

◆ dimensions

const deg_t* dimensions
protected

The pointer to the dimensions of the variables.


The documentation for this class was generated from the following file: