NOMAD Source
Version 4.0.0 Beta
|
Latin Hypercube Sampling class. More...
#include <LHS.hpp>
Public Member Functions | |
LHS (const size_t n, const size_t p, const ArrayOfDouble lowerBound, const ArrayOfDouble upperBound, const int seed=2920) | |
Constructor. More... | |
int | getSeed (void) const |
Get seed for random generation. More... | |
void | setSeed (const int seed) |
Set seed for random generation. More... | |
ArrayOfDouble | getLowerBound () const |
Get lower bound. More... | |
void | setLowerBound (const ArrayOfDouble lowerBound) |
Set lower bound. More... | |
ArrayOfDouble | getUpperBound (void) const |
Get upper bound. More... | |
void | setUpperBound (const ArrayOfDouble upperBound) |
Set upper bound. More... | |
std::vector< Point > | Sample () const |
Do the sampling. More... | |
Static Public Member Functions | |
static std::vector< size_t > | Permutation (const size_t p) |
Random permutation of the vector (1, 2, .., p) More... | |
Private Attributes | |
size_t | _n |
dimension More... | |
size_t | _p |
number of samples More... | |
ArrayOfDouble | _lowerBound |
lower bounds More... | |
ArrayOfDouble | _upperBound |
upper bounds More... | |
int | _seed |
seed More... | |
Latin Hypercube Sampling class.
Input: n dimension p number of desired samples lowerBound and upperBound of type ArrayOfDouble indicating lower and upper bounds. Must be completely defined. seed (optional)
Output: p points of dimension n, distributed in the l x u hyper-rectangle of R^n
|
explicit |
Constructor.
n | Dimension – IN. |
p | Number of samples – IN. |
lowerBound | Lower bounds – IN. |
upperBound | Upper bounds – IN. |
seed | Seed – IN (Opt) (default = 2920). |
|
inline |
|
inline |
|
inline |
|
static |
Random permutation of the vector (1, 2, .., p)
p | Number of positive integers elements in series – . |
std::vector<Point> LHS::Sample | ( | ) | const |
Do the sampling.
Points
.
|
inline |
Set lower bound.
lowerBound | An ArrayOfDouble for lower bound – . |
Definition at line 70 of file LHS.hpp.
|
inline |
|
inline |
Set upper bound.
upperBound | An ArrayOfDouble for upper bound – . |
Definition at line 82 of file LHS.hpp.
|
private |
|
private |