Class to define a Galois Field and Methods for operations.
More...
#include <GaloisField.h>
|
static void | polyProd (int p, size_t u_n, const std::vector< int > &xton, const std::vector< int > &p1, const std::vector< int > &p2, std::vector< int > &prod) |
| Multiplication in polynomial representation. More...
|
|
static void | polySum (int p, size_t u_n, const std::vector< int > &p1, const std::vector< int > &p2, std::vector< int > &sum) |
| Addition in polynomial representation. More...
|
|
static int | poly2int (int p, int n, const std::vector< int > &poly) |
| Convert polynomial to integer in 0..q-1 More...
|
|
|
int | n |
| prime modulus exponent q = p^n
|
|
size_t | u_n |
| polynomial vector length
|
|
int | p |
| prime modulus q=p^n
|
|
int | q |
| the order of the field q = p^n
|
|
size_t | u_q |
| field element vector lenth
|
|
std::vector< int > | xton |
| characteristic polynomial of length u_n
|
|
std::vector< int > | inv |
| Indicator of which row of poly is the multiplicative inverse of this row of length u_q.
|
|
std::vector< int > | neg |
| row number of which row of poly is the negative (additive inverse) of this row of lenth u_q
|
|
std::vector< int > | root |
| root
|
|
bclib::matrix< int > | plus |
| sum field of dimension u_q x u_q
|
|
bclib::matrix< int > | times |
| product field of dimension u_q x u_q
|
|
bclib::matrix< int > | poly |
| polynomial field of dimenstion u_q x u_n
|
|
Class to define a Galois Field and Methods for operations.
◆ poly2int()
int oacpp::GaloisField::poly2int |
( |
int |
p, |
|
|
int |
n, |
|
|
const std::vector< int > & |
poly |
|
) |
| |
|
static |
Convert polynomial to integer in 0..q-1
- Parameters
-
p | polynomial multiplier |
n | the length of poly |
poly | the polynomial |
- Returns
- an integer
◆ polyProd()
void oacpp::GaloisField::polyProd |
( |
int |
p, |
|
|
size_t |
u_n, |
|
|
const std::vector< int > & |
xton, |
|
|
const std::vector< int > & |
p1, |
|
|
const std::vector< int > & |
p2, |
|
|
std::vector< int > & |
prod |
|
) |
| |
|
static |
Multiplication in polynomial representation.
- Parameters
-
p | modulus |
u_n | length of p1 and p2 |
xton | characteristic polynomial |
p1 | polynomial 1 |
p2 | polynomial 2 |
prod | the product of the polynomials |
◆ polySum()
void oacpp::GaloisField::polySum |
( |
int |
p, |
|
|
size_t |
u_n, |
|
|
const std::vector< int > & |
p1, |
|
|
const std::vector< int > & |
p2, |
|
|
std::vector< int > & |
sum |
|
) |
| |
|
static |
Addition in polynomial representation.
- Parameters
-
p | modulus |
u_n | the length of p1 and p2 |
p1 | polynomial 1 |
p2 | polynomial 2 |
sum | the sum of the polynomials |
The documentation for this class was generated from the following files: