Symmetric Polynomials  V3.1
A C++ library for generating symmetric polynomials with relations
PolynomialBasis< spec_t, orig_poly_t, new_poly_t > Class Template Reference

Factory class that provides the general interface of a generating basis for a subring of a polynomial ring. More...

#include <Symmetric_Basis.hpp>

Inheritance diagram for PolynomialBasis< spec_t, orig_poly_t, new_poly_t >:
[legend]
Collaboration diagram for PolynomialBasis< spec_t, orig_poly_t, new_poly_t >:
[legend]

Public Member Functions

new_poly_t operator() (orig_poly_t a) const
 Transform a polynomial on the original variables to one on the generating basis. More...
 
orig_poly_t operator() (const new_poly_t &a) const
 Transform a polynomial on the generating basis into a polynomial on the original variables. More...
 
 PolynomialBasis (int num)
 Constructor given number of variables. More...
 
const std::vector< orig_poly_t > & generators () const
 Returns vector containing the generating basis. More...
 
const std::vector< typename new_poly_t::deg_t > & dimensions () const
 Returns vector containing the dimensions of the generating basis (can be empty!) More...
 
const std::vector< std::string > & names () const
 Returns vector containing the names of the generating basis (can be empty!) More...
 

Public Attributes

const int number_of_variables
 The number of (the original) variables of the polynomial ring. More...
 

Protected Attributes

std::vector< orig_poly_t > _generators
 The generators of the polynomial basis, constructed in the inheriting class. More...
 
std::vector< typename new_poly_t::deg_t > generator_dimensions
 The dimensions of the generators, optionally constructed in the inheriting class. More...
 
std::vector< std::string > generator_names
 The names of the generators, optionally constructed in the inheriting class. More...
 

Detailed Description

template<class spec_t, class orig_poly_t, class new_poly_t>
class symmp::PolynomialBasis< spec_t, orig_poly_t, new_poly_t >

Factory class that provides the general interface of a generating basis for a subring of a polynomial ring.

Inherit from this class and construct data member _generators through the child class (and optionally generator_names and generator_dimensions).
The child class must also have a method find_exponent with signature:

typename new_poly_t::exp_t find_exponent(const typename orig_poly_t::exp_t&);

Example implementations are SymmetricBasis and TwistedChernBasis.

Template Parameters
spec_tUsed for compile-time polymorphism (CRTP): must be the child class.
orig_poly_tType of polynomial on the original variables
new_poly_tType of polynomial on the new variables (the _generators)

Constructor & Destructor Documentation

◆ PolynomialBasis()

PolynomialBasis ( int  num)

Constructor given number of variables.

Parameters
numThe number of variables for the polynomials

Member Function Documentation

◆ operator()() [1/2]

new_poly_t operator() ( orig_poly_t  a) const

Transform a polynomial on the original variables to one on the generating basis.

Parameters
aPolynomial on the original variables
Returns
Polynomial on the new variables

◆ operator()() [2/2]

orig_poly_t operator() ( const new_poly_t &  a) const

Transform a polynomial on the generating basis into a polynomial on the original variables.

Parameters
aPolynomial on the new variables
Returns
Polynomial on the original variables

◆ generators()

const std::vector<orig_poly_t>& generators ( ) const

Returns vector containing the generating basis.

◆ dimensions()

const std::vector<typename new_poly_t::deg_t>& dimensions ( ) const

Returns vector containing the dimensions of the generating basis (can be empty!)

◆ names()

const std::vector<std::string>& names ( ) const

Returns vector containing the names of the generating basis (can be empty!)

Member Data Documentation

◆ number_of_variables

const int number_of_variables

The number of (the original) variables of the polynomial ring.

◆ _generators

std::vector<orig_poly_t> _generators
protected

The generators of the polynomial basis, constructed in the inheriting class.

◆ generator_dimensions

std::vector<typename new_poly_t::deg_t> generator_dimensions
protected

The dimensions of the generators, optionally constructed in the inheriting class.

◆ generator_names

std::vector<std::string> generator_names
protected

The names of the generators, optionally constructed in the inheriting class.


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