|
Latin Hypercube Samples (lhs)
1.0
R, C++, and Rcpp code to generate Latin hypercube samples
|
#include <sstream>#include <algorithm>#include <Rcpp.h>#include "COrthogonalArray.h"#include "matrix.h"#include "oa_r_utils.h"Go to the source code of this file.
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) |
Variables | |
| const char * | typeConstants::BUSH = "bush" |
| const char * | typeConstants::BOSE = "bose" |
| const char * | typeConstants::BOSEBUSH = "bosebush" |
| const char * | typeConstants::BUSHT = "busht" |
| const char * | typeConstants::BOSEBUSHL = "bosebushl" |
| const char * | typeConstants::ADDELKEMP = "addelkemp" |
| const char * | typeConstants::ADDELKEMP3 = "addelkemp3" |
| const char * | typeConstants::ADDELKEMPN = "addelkempn" |
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 |
| n | length of p1 and p2 |
| xton | characteristic polynomial |
| p1 | polynomial 1 |
| p2 | polynomial 2 |
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 | the length of p1 and p2 |
| p1 | polynomial 1 |
| p2 | polynomial 2 |
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 |
| const char* typeConstants::ADDELKEMP = "addelkemp" |
addelkemp algorithm indicator
| const char* typeConstants::ADDELKEMP3 = "addelkemp3" |
addelkemp3 algorithm indicator
| const char* typeConstants::ADDELKEMPN = "addelkempn" |
addelkempn algorithm indicator
| const char* typeConstants::BOSE = "bose" |
bose algorithm indicator
| const char* typeConstants::BOSEBUSH = "bosebush" |
bosebush algorithm indicator
| const char* typeConstants::BOSEBUSHL = "bosebushl" |
bosebushl algorithm indicator
| const char* typeConstants::BUSH = "bush" |
bush algorithm indicator
| const char* typeConstants::BUSHT = "busht" |
busht algorithm indicator