Orthogonal Array Library  1.0.0
Libray for generating orthogonal arrays based on Art Owen's oa library
All Classes Namespaces Files Functions Variables Typedefs Macros Pages
oacpp::GaloisField Class Reference

Class to define a Galois Field and Methods for operations. More...

#include <GaloisField.h>

Public Member Functions

 GaloisField (int q)
 Construct the Galois Field with order q.
 
 GaloisField ()
 Default Constructor.
 
void print ()
 Print a Galois field.
 

Static Public Member Functions

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...
 

Public Attributes

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
 

Detailed Description

Class to define a Galois Field and Methods for operations.

Member Function Documentation

◆ poly2int()

int oacpp::GaloisField::poly2int ( int  p,
int  n,
const std::vector< int > &  poly 
)
static

Convert polynomial to integer in 0..q-1

Parameters
ppolynomial multiplier
nthe length of poly
polythe 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
pmodulus
u_nlength of p1 and p2
xtoncharacteristic polynomial
p1polynomial 1
p2polynomial 2
prodthe 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
pmodulus
u_nthe length of p1 and p2
p1polynomial 1
p2polynomial 2
sumthe sum of the polynomials

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