OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
LatinHyperCube Class Referenceabstract

#include <LatinHyperCube.h>

Inheritance diagram for LatinHyperCube:
Collaboration diagram for LatinHyperCube:

Public Types

typedef std::uniform_real_distribution< double > dist_t

Public Member Functions

 LatinHyperCube (double lower, double upper)
 LatinHyperCube (double lower, double upper, int seed)
 ~LatinHyperCube ()
void create (std::shared_ptr< SampleIndividual > &ind, std::size_t i)
void allocate (const CmdArguments_t &args, const Comm::Bundle_t &comm)
virtual void create (std::shared_ptr< SampleIndividual > &ind, size_t i)=0

Private Member Functions

double map2domain_m (double val)
void fillBins_m (std::size_t nTotal, std::size_t nLocal, int startBin, std::size_t seed)

Private Attributes

std::deque< std::size_t > bin_m
double binsize_m
double upper_m
double lower_m
dist_t dist_m
RNGStreamRNGInstance_m
std::size_t seed_m

Detailed Description

Definition at line 30 of file LatinHyperCube.h.

Member Typedef Documentation

◆ dist_t

typedef std::uniform_real_distribution<double> LatinHyperCube::dist_t

Definition at line 34 of file LatinHyperCube.h.

Constructor & Destructor Documentation

◆ LatinHyperCube() [1/2]

LatinHyperCube::LatinHyperCube ( double lower,
double upper )
inline

Definition at line 36 of file LatinHyperCube.h.

References binsize_m, dist_m, lower_m, RNGInstance_m, seed_m, and upper_m.

◆ LatinHyperCube() [2/2]

LatinHyperCube::LatinHyperCube ( double lower,
double upper,
int seed )
inline

Definition at line 45 of file LatinHyperCube.h.

References binsize_m, dist_m, lower_m, RNGInstance_m, seed_m, and upper_m.

◆ ~LatinHyperCube()

LatinHyperCube::~LatinHyperCube ( )
inline

Definition at line 54 of file LatinHyperCube.h.

References RNGStream::deleteInstance(), and RNGInstance_m.

Here is the call graph for this function:

Member Function Documentation

◆ allocate()

void LatinHyperCube::allocate ( const CmdArguments_t & ,
const Comm::Bundle_t &  )
inlinevirtual

Allocate memory for sampling. Not every sampling method requires that.

This function is used to reduce memory since only the sampler ranks need these sampling methods.

Parameters
argssamler arguments
commsampler communicator

Reimplemented from SamplingMethod.

Definition at line 66 of file LatinHyperCube.h.

References binsize_m, fillBins_m(), CmdArguments::getArg(), RNGStream::getInstance(), Comm::Bundle_t::island_id, lower_m, RNGInstance_m, seed_m, and upper_m.

Here is the call graph for this function:

◆ create() [1/2]

void LatinHyperCube::create ( std::shared_ptr< SampleIndividual > & ind,
std::size_t i )
inline

Definition at line 59 of file LatinHyperCube.h.

References dist_m, map2domain_m(), and RNGInstance_m.

Here is the call graph for this function:

◆ create() [2/2]

virtual void SamplingMethod::create ( std::shared_ptr< SampleIndividual > & ind,
size_t i )
pure virtualinherited

◆ fillBins_m()

void LatinHyperCube::fillBins_m ( std::size_t nTotal,
std::size_t nLocal,
int startBin,
std::size_t seed )
inlineprivate

Definition at line 116 of file LatinHyperCube.h.

References bin_m.

Referenced by allocate().

◆ map2domain_m()

double LatinHyperCube::map2domain_m ( double val)
inlineprivate

Definition at line 99 of file LatinHyperCube.h.

References bin_m, binsize_m, and lower_m.

Referenced by create().

Member Data Documentation

◆ bin_m

std::deque<std::size_t> LatinHyperCube::bin_m
private

Definition at line 134 of file LatinHyperCube.h.

Referenced by fillBins_m(), and map2domain_m().

◆ binsize_m

double LatinHyperCube::binsize_m
private

Definition at line 135 of file LatinHyperCube.h.

Referenced by allocate(), LatinHyperCube(), LatinHyperCube(), and map2domain_m().

◆ dist_m

dist_t LatinHyperCube::dist_m
private

Definition at line 140 of file LatinHyperCube.h.

Referenced by create(), LatinHyperCube(), and LatinHyperCube().

◆ lower_m

double LatinHyperCube::lower_m
private

Definition at line 138 of file LatinHyperCube.h.

Referenced by allocate(), LatinHyperCube(), LatinHyperCube(), and map2domain_m().

◆ RNGInstance_m

RNGStream* LatinHyperCube::RNGInstance_m
private

Definition at line 142 of file LatinHyperCube.h.

Referenced by allocate(), create(), LatinHyperCube(), LatinHyperCube(), and ~LatinHyperCube().

◆ seed_m

std::size_t LatinHyperCube::seed_m
private

Definition at line 144 of file LatinHyperCube.h.

Referenced by allocate(), LatinHyperCube(), and LatinHyperCube().

◆ upper_m

double LatinHyperCube::upper_m
private

Definition at line 137 of file LatinHyperCube.h.

Referenced by allocate(), LatinHyperCube(), and LatinHyperCube().


The documentation for this class was generated from the following file: