Latin Hypercube Samples (lhs)
1.0
R, C++, and Rcpp code to generate Latin hypercube samples
|
#include "rutils.h"
Namespaces | |
oacpp | |
Functions | |
void | oacpp::rutils::unifperm (std::vector< int > &pi, int q, RUnif &randomClass) |
License: This file may be freely used and shared according to the original license.
Reference:
Original Header:
These programs construct and manipulate orthogonal arrays. They were prepared by
- Art Owen
- Department of Statistics
- Sequoia Hall
- Stanford CA 94305
They may be freely used and shared. This code comes with no warranty of any kind. Use it at your own risk.
I thank the Semiconductor Research Corporation and the National Science Foundation for supporting this work.
void oacpp::rutils::unifperm | ( | std::vector< int > & | pi, |
int | q, | ||
RUnif & | randomClass | ||
) |
In S one just does rank(runif(q)). Here we want something like rank(runif(q))-1 since the symbols to be permuted are 0..q-1
pi | a vector of integers to be permuted |
q | length of the vector |
randomClass | a random number generator class |