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::oaconstruct Namespace Reference

Functions

int bosecheck (int q, int ncol)
 
int bose (GaloisField &gf, bclib::matrix< int > &A, int ncol)
 
int itopoly (int n, int q, int d, std::vector< int > &coef)
 
int polyeval (GaloisField &gf, int d, std::vector< int > &poly, int arg, int *value)
 
int bushcheck (int q, int str, int ncol)
 
int bush (GaloisField &gf, bclib::matrix< int > &A, int str, int ncol)
 
int addelkempcheck (int q, int p, int ncol)
 
int addelkemp (GaloisField &gf, bclib::matrix< int > &A, int ncol)
 
int bosebushcheck (int q, int p, int ncol)
 
int bosebush (GaloisField &gf, bclib::matrix< int > &B, int ncol)
 
int bosebushlcheck (int s, int p, int lam, int ncol)
 
int bosebushl (GaloisField &gf, int lam, bclib::matrix< int > &B, int ncol)
 

Detailed Description

Namespace to construct Orthogonal Arrays using various algorithms

Function Documentation

◆ addelkemp()

int oacpp::oaconstruct::addelkemp ( GaloisField gf,
bclib::matrix< int > &  A,
int  ncol 
)

Implement Addelman and Kempthorne's 1961 A.M.S. method with n=2

Parameters
gfa Galois field
Aan matrix to return the orthogonal array
ncolthe desired number of columns
Returns
an indicator of success

◆ addelkempcheck()

int oacpp::oaconstruct::addelkempcheck ( int  q,
int  p,
int  ncol 
)

Test the inputs to the Addel-Kemp algorithm

Parameters
qthe order of Galois field
pthe prime basis of the Galois field
ncolthe number of columns in the orthogonal array
Returns
an indicator of success

◆ bose()

int oacpp::oaconstruct::bose ( GaloisField gf,
bclib::matrix< int > &  A,
int  ncol 
)

Construct an orthogonal array using the bose algorithm

OA( q^2, q+1, q, 2 ) R.C. Bose (1938) Sankhya Vol 3 pp 323-338

Parameters
gfa Galois field
Aan matrix to return the orthogonal array
ncolthe number of columns
Returns
an indicator of success

◆ bosebush()

int oacpp::oaconstruct::bosebush ( GaloisField gf,
bclib::matrix< int > &  B,
int  ncol 
)

Construct an orthogonal array using the bosebush algorithm

OA( 2q^2, 2q+1, q, 2 ), only implemented for q=2^n Implement Bose and Bush's 1952 A.M.S. method with p=2, u=1

Parameters
gfa Galois field
Ban matrix to return the orthogonal array
ncolthe desired number of columns
Returns
an indicator of success

◆ bosebushcheck()

int oacpp::oaconstruct::bosebushcheck ( int  q,
int  p,
int  ncol 
)

Test the inputs to the Bose-Bush algorithm (p == 2, ncol <= 2q + 1)

Parameters
qthe order of the Galois Field
pthe prime basis of the Galois Field (q = p^n)
ncolthe number of columns in the orthogonal array
Returns
an indicator of success

◆ bosebushl()

int oacpp::oaconstruct::bosebushl ( GaloisField gf,
int  lam,
bclib::matrix< int > &  B,
int  ncol 
)

Construct an orthogonal array using the bose-bush algorithm

Parameters
gfa Galois field
lamlambda
Ban matrix to return the orthogonal array
ncolthe desired number of columns
Returns
an indicator of success

◆ bosebushlcheck()

int oacpp::oaconstruct::bosebushlcheck ( int  s,
int  p,
int  lam,
int  ncol 
)

Test the inputs to the Bose-Bush algorithm with lambda parameter (ncol <= lambda*q + 1)

Parameters
ss = q / lambda
pthe prime basis of the Galois Field
lamthe lambda parameter
ncolthe number of columns in the orthogonal array
Returns
an indicator of success

◆ bosecheck()

int oacpp::oaconstruct::bosecheck ( int  q,
int  ncol 
)

Check the input to the bose algorithm (ncol <= q + 1) where q = p^n

Parameters
qthe number of symbols
ncolthe number of columns
Returns
an indicator of success

◆ bush()

int oacpp::oaconstruct::bush ( GaloisField gf,
bclib::matrix< int > &  A,
int  str,
int  ncol 
)

Construct an orthogonal array using the bush algorithm

Parameters
gfa Galois field
Aan matrix to return the orthogonal array
strthe array strength
ncolthe desired number of columns
Returns
an indicator of success

◆ bushcheck()

int oacpp::oaconstruct::bushcheck ( int  q,
int  str,
int  ncol 
)

Test the inputs to the Bush algorithm (ncol <= q + 1, str <= ncol, str < q + 1)

Parameters
qthe order of the Galois Field
strthe orthogonal array strength
ncolthe number of columns in the orthogonal array
Returns
an indicator of success

◆ itopoly()

int oacpp::oaconstruct::itopoly ( int  n,
int  q,
int  d,
std::vector< int > &  coef 
)

Integer to polynomial

Parameters
nthe input integer
qthe order of the Galois field
dthe degree of the polynomial. A degree 3 polynomial will have 4 coefficients (x^0, x^1, x^2, x^3)
coefvector of polynomial coefficients
Returns
an indicator of success

◆ polyeval()

int oacpp::oaconstruct::polyeval ( GaloisField gf,
int  d,
std::vector< int > &  poly,
int  arg,
int *  value 
)

Evaluate a polynomial with coefficients, argument and result in a Galois field

Parameters
gfa Galois field
dthe polynomial degree. A degree 3 polynomial will have 4 coefficients (x^0, x^1, x^2, x^3)
polythe polynomial coefficients
argthe value of the polynomial independent variable
valuethe result
Returns
an indicator of success