Latin Hypercube Samples (lhs)
1.0
R, C++, and Rcpp code to generate Latin hypercube samples
|
#include "oa_r.h"
Functions | |
RcppExport SEXP | oa_type1 (SEXP type, SEXP q, SEXP ncol, SEXP bRandom) |
RcppExport SEXP | oa_type2 (SEXP type, SEXP int1, SEXP q, SEXP ncol, SEXP bRandom) |
RcppExport SEXP | create_galois_field (SEXP q) |
RcppExport SEXP | poly_prod (SEXP p, SEXP n, SEXP xton, SEXP p1, SEXP p2) |
RcppExport SEXP | poly_sum (SEXP p, SEXP n, SEXP p1, SEXP p2) |
RcppExport SEXP | poly2int (SEXP p, SEXP n, SEXP poly) |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
RcppExport SEXP create_galois_field | ( | SEXP | q | ) |
Create a Galois Field object
q | the number of symbols in the array |
prime modulus exponent q = p^n — Polynomial vector length
prime modulus q = p^n
the order of the field q = p^n — field element vector length
characteristic polynomial of length u_n
Indicator of which row of poly is the multiplicative inverse of this row of length u_q
row number of which row of poly is the negative (additive inverse) of this row of length u_q
root
sum field of dimension u_q x u_q
product field of dimension u_q x u_q
polynomial field of dimension u_q x u_n
RcppExport SEXP oa_type1 | ( | SEXP | type, |
SEXP | q, | ||
SEXP | ncol, | ||
SEXP | bRandom | ||
) |
An entry point for a set of Orthogonal Array algorithms
type | The type of orthogonal array algorithm to use
|
q | the number of symbols in the array |
ncol | the number of columns in the array |
bRandom | whether the array should be randomized |
RcppExport SEXP oa_type2 | ( | SEXP | type, |
SEXP | int1, | ||
SEXP | q, | ||
SEXP | ncol, | ||
SEXP | bRandom | ||
) |
An entry point for a set of Orthogonal Array algorithms
type | The type of orthogonal array algorithm to use
|
int1 | a parameter that depends on the context
|
q | the number of symbols in the array |
ncol | the number of columns in the array |
bRandom | whether the array should be randomized |
RcppExport SEXP poly2int | ( | SEXP | p, |
SEXP | n, | ||
SEXP | poly | ||
) |
Convert polynomial to integer in 0..q-1
p | polynomial multiplier |
n | the length of poly |
poly | the polynomial |
RcppExport SEXP poly_prod | ( | SEXP | p, |
SEXP | n, | ||
SEXP | xton, | ||
SEXP | p1, | ||
SEXP | p2 | ||
) |
Multiplication in polynomial representation
p | modulus |
u_n | length of p1 and p2 |
xton | characteristic polynomial |
p1 | polynomial 1 |
p2 | polynomial 2 |
prod | the product of the polynomials |
RcppExport SEXP poly_sum | ( | SEXP | p, |
SEXP | n, | ||
SEXP | p1, | ||
SEXP | p2 | ||
) |
Addition in polynomial representation
p | modulus |
u_n | the length of p1 and p2 |
p1 | polynomial 1 |
p2 | polynomial 2 |
sum | the sum of the polynomials |