Latin Hypercube Samples (lhs)
1.0
R, C++, and Rcpp code to generate Latin hypercube samples
|
Classes | |
class | RStandardUniform |
Functions | |
void | findorder_zero (const Rcpp::NumericVector &v, Rcpp::IntegerVector &order) |
Rcpp::NumericMatrix | convertIntegerToNumericLhs (const bclib::matrix< int > &intMat) |
Rcpp::NumericMatrix | convertIntegerToNumericLhs (const Rcpp::IntegerMatrix &intMat) |
Rcpp::NumericMatrix | convertMatrixToNumericLhs (const bclib::matrix< double > &intMat) |
Rcpp::IntegerVector | runifint (unsigned int n, int min_int, int max_int) |
void | checkArguments (int n, int k) |
void | checkArguments (int n, int k, int dup) |
void | checkArguments (int n, int k, int maxsweeps, double eps) |
Rcpp::NumericMatrix | degenerateCase (int k, bclib::CRandom< double > &oRandom) |
template<int RTYPE> | |
Rcpp::NumericMatrix | calculateDistance (Rcpp::Matrix< RTYPE > &mat) |
template<int RTYPE> | |
double | calculateSOptimal (Rcpp::Matrix< RTYPE > &mat) |
a namespace for the lhs methods used in the R interface
Rcpp::NumericMatrix lhs_r::calculateDistance | ( | Rcpp::Matrix< RTYPE > & | mat | ) |
Calculate the distance between points in a matrix
mat | the matrix to use for the calculation |
RTYPE | the type of SEXP |
double lhs_r::calculateSOptimal | ( | Rcpp::Matrix< RTYPE > & | mat | ) |
calculate the S optimal criterion
mat | the input matrix |
RTYPE | the type of SEXP |
void lhs_r::checkArguments | ( | int | n, |
int | k | ||
) |
check the arguments are valid
n | number of rows / samples in the lhs |
k | number parameters / columns in the lhs |
void lhs_r::checkArguments | ( | int | n, |
int | k, | ||
int | dup | ||
) |
check that the arguments are valid
n | number of rows / samples in the lhs |
k | number parameters / columns in the lhs |
dup | A factor that determines the number of candidate points used in the search. |
void lhs_r::checkArguments | ( | int | n, |
int | k, | ||
int | maxsweeps, | ||
double | eps | ||
) |
check that the arguments are valid
n | number of rows / samples in the lhs |
k | number parameters / columns in the lhs |
maxsweeps | the maximum number of sweeps to use in the algorithm |
eps | The optimal stopping criterion |
Rcpp::NumericMatrix lhs_r::convertIntegerToNumericLhs | ( | const bclib::matrix< int > & | intMat | ) |
convert an integer matrix to a numeric latin hypercube sample
intMat | the input matrix to be converted |
Rcpp::NumericMatrix lhs_r::convertIntegerToNumericLhs | ( | const Rcpp::IntegerMatrix & | intMat | ) |
convert a Rcpp::IntegerMatrix to a numeric latin hypercube sample
intMat | the input matrix to be converted |
Rcpp::NumericMatrix lhs_r::convertMatrixToNumericLhs | ( | const bclib::matrix< double > & | intMat | ) |
convert a numeric matrix to a numeric latin hypercube sample
intMat | the input matrix to be converted |
Rcpp::NumericMatrix lhs_r::degenerateCase | ( | int | k, |
bclib::CRandom< double > & | oRandom | ||
) |
develop an lhs sample in the degenerate case
k | number parameters / columns in the lhs |
oRandom | a random number generator for the hypercube |
void lhs_r::findorder_zero | ( | const Rcpp::NumericVector & | v, |
Rcpp::IntegerVector & | order | ||
) |
find the order of an input vector using 0 as the first order
v | the input values |
order | the order of the input values |
Rcpp::IntegerVector lhs_r::runifint | ( | unsigned int | n, |
int | min_int, | ||
int | max_int | ||
) |
a uniform integer sample between min and max
n | the size of the sample |
min_int | the minimum integer in the sample |
max_int | the maximum integer in the sample |