|
Latin Hypercube Samples (lhs)
1.0
R, C++, and Rcpp code to generate Latin hypercube samples
|
#include <cstdlib>#include <cmath>#include <exception>#include <vector>#include <algorithm>#include <functional>#include <numeric>#include <cfloat>#include <climits>#include <cstdio>#include <iostream>#include "matrix.h"#include "order.h"#include "CRandom.h"Go to the source code of this file.
Namespaces | |
| lhslib | |
Macros | |
| #define | PRINT_MACRO std::cout |
| #define | ERROR_MACRO std::cerr |
| #define | PRINT_RESULT 0 |
| #define | START_RNG Rcpp::RNGScope * tempRNG = new Rcpp::RNGScope(); |
| #define | END_RNG delete tempRNG; |
Typedefs | |
| typedef bclib::matrix< int >::size_type | lhslib::msize_type |
| typedef std::vector< int >::size_type | lhslib::vsize_type |
Functions | |
| void | lhslib::improvedLHS (int n, int k, int dup, bclib::matrix< int > &result, bclib::CRandom< double > &oRandom) |
| void | lhslib::maximinLHS (int n, int k, int dup, bclib::matrix< int > &result, bclib::CRandom< double > &oRandom) |
| void | lhslib::optimumLHS (int n, int k, int maxSweeps, double eps, bclib::matrix< int > &outlhs, int optimalityRecordLength, bclib::CRandom< double > &oRandom, bool bVerbose) |
| void | lhslib::optSeededLHS (int n, int k, int maxSweeps, double eps, bclib::matrix< double > &oldHypercube, int optimalityRecordLength, bool bVerbose) |
| void | lhslib::randomLHS (int n, int k, bool bPreserveDraw, bclib::matrix< double > &result, bclib::CRandom< double > &oRandom) |
| void | lhslib::randomLHS (int n, int k, bclib::matrix< int > &result, bclib::CRandom< double > &oRandom) |
| void | lhslib::geneticLHS (int n, int k, int pop, int gen, double pMut, const std::string &criterium, bool bVerbose, bclib::matrix< double > &result, 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/.
| #define END_RNG delete tempRNG; |
End RNG Macro (See lhs_r.cpp)
| #define ERROR_MACRO std::cerr |
Macro to choose the function for error printing
| #define PRINT_MACRO std::cout |
Macro to choose the function for printing
| #define PRINT_RESULT 0 |
Should results be printed
| #define START_RNG Rcpp::RNGScope * tempRNG = new Rcpp::RNGScope(); |
RNG Macro (See lhs_r.cpp)