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
oarutils Namespace Reference

Functions

void randomizeOA (Rcpp::IntegerMatrix &oa, int q)
 
template<class T >
void convertToIntegerMatrix (const bclib::matrix< T > &A, Rcpp::IntegerMatrix &rcppA)
 
template<class T , class U >
void convertToRcppMatrix (const bclib::matrix< T > &A, U &rcppA)
 
template<class T , class U >
void convertToMatrix (const U &rcppA, bclib::matrix< T > &A)
 

Detailed Description

A namespace for R connection utilities

Function Documentation

◆ convertToIntegerMatrix()

template<class T >
void oarutils::convertToIntegerMatrix ( const bclib::matrix< T > &  A,
Rcpp::IntegerMatrix &  rcppA 
)

A method to convert an oacpp::matrix to an Rcpp::IntegerMatrix

Template Parameters
Tan atomic type that is convertible to int through a static_cast<int>(T t)
Parameters
Aan orthogonal array matrix
rcppAthe output Rcpp::IntegerMatrix
Returns
an integer matrix

◆ convertToMatrix()

template<class T , class U >
void oarutils::convertToMatrix ( const U &  rcppA,
bclib::matrix< T > &  A 
)

A method to convert a Rcpp::NumericMatrix or Rcpp::IntegerMatrix to a bclib::matrix

Template Parameters
Tan atomic type that matches the Rcpp type
Uan Rcpp matrix type
Parameters
Aa bclib::matrix
rcppAa Rcpp matrix
Returns

◆ convertToRcppMatrix()

template<class T , class U >
void oarutils::convertToRcppMatrix ( const bclib::matrix< T > &  A,
U &  rcppA 
)

A method to convert a bclib::matrix to an Rcpp::NumericMatrix or Rcpp::IntegerMatrix

Template Parameters
Tan atomic type that matches the Rcpp type
Uan Rcpp matrix type
Parameters
Aa bclib matrix
rcppAa Rcpp matrix
Returns

◆ randomizeOA()

void oarutils::randomizeOA ( Rcpp::IntegerMatrix &  oa,
int  q 
)

permute the entries of each column in an orthogonal array

Parameters
oaA Rcpp::IntegerMatrix containing an orthogonal array
qThe number of unique entries in each column