Symmetric Polynomials  V3.1
A C++ library for generating symmetric polynomials with relations
StandardVariables< T, _deg > Struct Template Reference

The standard variables \(x_i\) in a polynomial, with \(|x_i|=1\) and no relations. More...

#include <Symmetric_Basis.hpp>

Inheritance diagram for StandardVariables< T, _deg >:
[legend]
Collaboration diagram for StandardVariables< T, _deg >:
[legend]

Public Types

typedef _deg deg_t
 Degree typedef. More...
 

Public Member Functions

deg_t degree () const
 Computes degree of monomial on standard variables \(x_i\). More...
 
StandardVariables operator+ (const StandardVariables &b) const
 Multiplies monomials by adding their exponents. More...
 
size_t operator() () const
 Hashes monomial. More...
 

Static Public Member Functions

static std::string name (int i, int n)
 Returns the names of the standard variables \(x_i\). More...
 

Detailed Description

template<class T = int64_t, class _deg = int64_t>
struct symmp::StandardVariables< T, _deg >

The standard variables \(x_i\) in a polynomial, with \(|x_i|=1\) and no relations.

A monomial \(x_1^{a_1}\cdots x_n^{a_n}\) is stored as the vector \([a_1,...,a_n]\)

Template Parameters
TThe (integral) value type of the exponent vector.
_degThe (integral) value type used in the degree function.

Member Typedef Documentation

◆ deg_t

typedef _deg deg_t

Degree typedef.

Member Function Documentation

◆ degree()

deg_t degree ( ) const

Computes degree of monomial on standard variables \(x_i\).

Returns
Degree \(\sum_ia_i\) for monomial \(x_1^{a_1}\cdots x_n^{a_n}\) (*this= \([a_1,...,a_n]\))

◆ name()

static std::string name ( int  i,
int  n 
)
static

Returns the names of the standard variables \(x_i\).

Returns
"x_i"
Parameters
iThe variable index
nThe number variables

◆ operator+()

StandardVariables operator+ ( const StandardVariables< T, _deg > &  b) const

Multiplies monomials by adding their exponents.

Parameters
bThe exponent \([b_1,...,b_n]\) we add to *this= \([a_1,...,a_n]\)
Returns
Degree \([a_1+b_1,...,a_n+b_n]\)

◆ operator()()

size_t operator() ( ) const

Hashes monomial.

Returns
Hash of exponent vector (calls generic_hasher)

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