Variables \(x_1,...,x_n,y_1,...,y_n\) with \(y_i^2=y_i\) and \(|x_i|=1\), \(|y_i|=0\).
More...
#include <Half_Idempotent.hpp>
|
static std::string | name (int i, int num) |
| Returns the names of the variables \(x_i,y_i\). More...
|
|
template<class T = int64_t, class _deg = int64_t, size_t N = 0>
struct symmp::HalfIdempotentVariables< T, _deg, N >
Variables \(x_1,...,x_n,y_1,...,y_n\) with \(y_i^2=y_i\) and \(|x_i|=1\), \(|y_i|=0\).
Monomial \(x_1^{a_1}\cdots x_n^{a_n}y_1^{a_{n+1}}\cdots y_n^{a_{2n}}\) is stored as vector/array \([a_1,...,a_{2n}]\)
- Template Parameters
-
T | The (integral) value type of the exponent vector. |
_deg | The (integral) value type used in the degree function. |
N | The number of variables in compile-time; set to 0 if unknown (default). Otherwise N= \(2n\). |
◆ deg_t
◆ operator+()
Multiplies monomials by adding their exponents.
- Parameters
-
b | The exponent \([b_1,...,b_{2n}]\) we add to *this = \([a_1,...,a_{2n}]\) |
- Returns
- Exponent \([a_1+b_1,...,a_n+b_n, \max(a_{n+1},b_{n+1}), ..., \max(a_{2n},b_{2n})]\)
◆ operator-()
Divides monomials by subtracting their exponents.
- Parameters
-
b | The exponent \([b_1,...,b_{2n}]\) we subtract from *this = \([a_1,...,a_{2n}]\). |
- Warning
- We must have \(b_i\le a_i\) for every \(i\).
- Returns
- Exponent \([a_1-b_1,...,a_n-b_n, |a_{n+1}-b_{n+1}|, ..., |a_{2n}-b_{2n}|]\)
◆ degree()
Computes degree of the monomial on the \(x_i,y_i\) with \(|x_i|=1\) and \(|y_i|=0\).
- Returns
- Degree \(\sum_{i=1}^na_i\) for monomial \(x_1^{a_1}\cdots y_n^{a_{2n}}\) (
*this
= \([a_1,...,a_{2n}]\))
◆ name()
static std::string name |
( |
int |
i, |
|
|
int |
num |
|
) |
| |
|
static |
Returns the names of the variables \(x_i,y_i\).
- Parameters
-
i | The variable index |
num | The number variables = \(2n\) |
- Returns
- "x_i" if i<n and "y_{i-n}" if i>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: