Latin Hypercube Samples (lhs)
1.0
R, C++, and Rcpp code to generate Latin hypercube samples
|
#include "oaLHS.h"
Typedefs | |
using | oalhslib::msize_type = bclib::matrix< int >::size_type |
using | oalhslib::columnit = bclib::matrix< int >::columnwise_iterator |
using | oalhslib::viterator = std::vector< int >::iterator |
using | oalhslib::vconstiterator = std::vector< int >::const_iterator |
using | oalhslib::vsize_type = std::vector< int >::size_type |
Functions | |
void | oalhslib::oaLHS (int n, int k, const bclib::matrix< int > &oa, bclib::matrix< int > &intlhs, bclib::matrix< double > &lhs, bool bVerbose, bclib::CRandom< double > &oRandom) |
void | oalhslib::printOAandUnique (const bclib::matrix< int > &oa, const std::vector< std::vector< int > > &uniqueLevelsVector) |
void | oalhslib::oaLHS (int n, int k, const bclib::matrix< int > &oa, bclib::matrix< int > &intlhs, bool bVerbose) |
void | oalhslib::replaceOAValues (const bclib::matrix< int > &oa, const std::vector< std::vector< int > > &uniqueLevelsVector, bclib::matrix< int > &intlhs, bclib::CRandom< double > &oRandom, bool isRandom) |
void | oalhslib::generateOALHS (int n, int k, bclib::matrix< double > &oalhs, bool bChooseLargerDesign, bool bVerbose, bclib::CRandom< double > &oRandom) |
License: GNU Lesser General Public License (LGPL v3) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
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 Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.
using oalhslib::columnit = typedef bclib::matrix<int>::columnwise_iterator |
matrix column iterator
using oalhslib::msize_type = typedef bclib::matrix<int>::size_type |
matrix size type
using oalhslib::vconstiterator = typedef std::vector<int>::const_iterator |
vector const iterator
using oalhslib::viterator = typedef std::vector<int>::iterator |
vector iterator
using oalhslib::vsize_type = typedef std::vector<int>::size_type |
vector size type
void oalhslib::generateOALHS | ( | int | n, |
int | k, | ||
bclib::matrix< double > & | oalhs, | ||
bool | bChooseLargerDesign, | ||
bool | bVerbose, | ||
bclib::CRandom< double > & | oRandom | ||
) |
generate an orthogonal array Latin hypercube
n | the number of rows or samples |
k | the number of columns or parameters |
oalhs | the generated Latin hypercube sample |
bChooseLargerDesign | choose a larger design if the orthogonal array is not sufficient |
bVerbose | should messages be printed |
oRandom | a random generator |
void oalhslib::oaLHS | ( | int | n, |
int | k, | ||
const bclib::matrix< int > & | oa, | ||
bclib::matrix< int > & | intlhs, | ||
bclib::matrix< double > & | lhs, | ||
bool | bVerbose, | ||
bclib::CRandom< double > & | oRandom | ||
) |
create an orthogonal array latin hypercube from an orthogonal array
n | the number of rows or samples |
k | the number of columns or parameters |
oa | an orthogonal array |
intlhs | an integer based Latin hypercube sample |
lhs | a Latin hypercube sample |
bVerbose | will messages be printed |
oRandom | a random generator |
void oalhslib::oaLHS | ( | int | n, |
int | k, | ||
const bclib::matrix< int > & | oa, | ||
bclib::matrix< int > & | intlhs, | ||
bool | bVerbose | ||
) |
create a deterministic orthogonal array latin hypercube from an orthogonal array
n | the number of rows or samples |
k | the number of columns or parameters |
oa | an orthogonal array |
intlhs | an integer based Latin hypercube sample |
bVerbose | will messages be printed |
void oalhslib::printOAandUnique | ( | const bclib::matrix< int > & | oa, |
const std::vector< std::vector< int > > & | uniqueLevelsVector | ||
) |
print an orthogonal array and the unique levels
oa | an orthogonal array |
uniqueLevelsVector |
void oalhslib::replaceOAValues | ( | const bclib::matrix< int > & | oa, |
const std::vector< std::vector< int > > & | uniqueLevelsVector, | ||
bclib::matrix< int > & | intlhs, | ||
bclib::CRandom< double > & | oRandom, | ||
bool | isRandom | ||
) |
replace orthogonal array values
oa | an orthogonal array |
uniqueLevelsVector | |
intlhs | an integer based Latin hypercube sample |
oRandom | a random number generator |
isRandom | is the result randomized |