Latin Hypercube Samples (lhs)  1.0
R, C++, and Rcpp code to generate Latin hypercube samples
All Classes Namespaces Files Functions Variables Typedefs Macros Pages
oacpp::GaloisField Class Reference

#include <GaloisField.h>

Public Member Functions

 GaloisField (int q)
 
 GaloisField ()
 
void print ()
 

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)
 
static void polySum (int p, size_t u_n, const std::vector< int > &p1, const std::vector< int > &p2, std::vector< int > &sum)
 
static int poly2int (int p, int n, const std::vector< int > &poly)
 

Public Attributes

int n
 
size_t u_n
 
int p
 
int q
 
size_t u_q
 
std::vector< int > xton
 
std::vector< int > inv
 
std::vector< int > neg
 
std::vector< int > root
 
bclib::matrix< int > plus
 
bclib::matrix< int > times
 
bclib::matrix< int > poly
 

Detailed Description

Class to define a Galois Field and Methods for operations

Constructor & Destructor Documentation

◆ GaloisField() [1/2]

oacpp::GaloisField::GaloisField ( int  q)
explicit

Construct the Galois Field with order q

◆ GaloisField() [2/2]

oacpp::GaloisField::GaloisField ( )

Default Constructor

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

◆ print()

void oacpp::GaloisField::print ( )

Print a Galois field

Member Data Documentation

◆ inv

std::vector<int> oacpp::GaloisField::inv

Indicator of which row of poly is the multiplicative inverse of this row of length u_q

◆ n

int oacpp::GaloisField::n

prime modulus exponent q = p^n

◆ neg

std::vector<int> oacpp::GaloisField::neg

row number of which row of poly is the negative (additive inverse) of this row of length u_q

◆ p

int oacpp::GaloisField::p

prime modulus q=p^n

◆ plus

bclib::matrix<int> oacpp::GaloisField::plus

sum field of dimension u_q x u_q

◆ poly

bclib::matrix<int> oacpp::GaloisField::poly

polynomial field of dimension u_q x u_n

◆ q

int oacpp::GaloisField::q

the order of the field q = p^n

◆ root

std::vector<int> oacpp::GaloisField::root

root

◆ times

bclib::matrix<int> oacpp::GaloisField::times

product field of dimension u_q x u_q

◆ u_n

size_t oacpp::GaloisField::u_n

polynomial vector length

◆ u_q

size_t oacpp::GaloisField::u_q

field element vector lenth

◆ xton

std::vector<int> oacpp::GaloisField::xton

characteristic polynomial of length u_n


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