24 "The distribution names to be sampled, the number of distributions provided defines the " 25 "number of columns per matrix.");
32 const auto & distribution_names = getParam<std::vector<DistributionName>>(
"distributions");
33 for (
const DistributionName &
name : distribution_names)
48 const auto seed =
getRandl(col, 0, std::numeric_limits<uint32_t>::max(), 1);
56 mooseAssert(
_shufflers.size() > 0,
"Shufflers have not been initialized.");
64 const auto bin =
_shufflers[col_index]->permute(row_index);
67 const auto lower = bin * bin_size;
68 const auto upper = (bin + 1) * bin_size;
69 const Real probability =
void setNumberOfRows(dof_id_type n_rows)
LatinHypercubeSampler(const InputParameters ¶meters)
static InputParameters validParams()
unsigned int getRandl(std::size_t n, unsigned int lower, unsigned int upper, unsigned int index=0) const
const std::string & name() const
Real getRand(std::size_t n, unsigned int index=0) const
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Return the sample value for the given row and column.
static InputParameters validParams()
dof_id_type getNumberOfRows() const
const Distribution & getDistributionByName(const DistributionName &name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void setNumberOfCols(dof_id_type n_cols)
virtual void executeTearDown() override
Constructs one MooseRandomPerturbation per column, each seeded independently from generator 1...
registerMooseObjectAliased("StochasticToolsApp", LatinHypercubeSampler, "LatinHypercube")
IntRange< T > make_range(T beg, T end)
std::vector< std::unique_ptr< MooseRandomPerturbation > > _shufflers
Per-column pseudo-random permuters that enforce the LHS bin assignment.
std::vector< Distribution const * > _distributions
Distribution objects, one per column, whose quantile functions are sampled.
Implements Latin Hypercube Sampling (LHS) over a set of distributions.
dof_id_type getNumberOfCols() const
void setNumberOfRandomSeeds(std::size_t number)