OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
LatinHyperCube Class Reference

#include <LatinHyperCube.h>

Inheritance diagram for LatinHyperCube:
Inheritance graph
[legend]
Collaboration diagram for LatinHyperCube:
Collaboration graph
[legend]

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 (boost::shared_ptr< SampleIndividual > &ind, std::size_t i)
 
void allocate (const CmdArguments_t &args, const Comm::Bundle_t &comm)
 
- Public Member Functions inherited from SamplingMethod
virtual ~SamplingMethod ()
 
virtual void create (boost::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 10 of file LatinHyperCube.h.

Member Typedef Documentation

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

Definition at line 14 of file LatinHyperCube.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file LatinHyperCube.h.

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

Definition at line 25 of file LatinHyperCube.h.

LatinHyperCube::~LatinHyperCube ( )
inline

Definition at line 34 of file LatinHyperCube.h.

References RNGStream::deleteInstance(), and RNGInstance_m.

Here is the call graph for this function:

Member Function Documentation

void LatinHyperCube::allocate ( const CmdArguments_t args,
const Comm::Bundle_t comm 
)
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 46 of file LatinHyperCube.h.

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

Here is the call graph for this function:

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

Definition at line 39 of file LatinHyperCube.h.

References dist_m, RNGStream::getNext(), map2domain_m(), and RNGInstance_m.

Here is the call graph for this function:

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

Definition at line 96 of file LatinHyperCube.h.

References bin_m.

Referenced by allocate().

double LatinHyperCube::map2domain_m ( double  val)
inlineprivate

Definition at line 79 of file LatinHyperCube.h.

References bin_m, binsize_m, and lower_m.

Referenced by create().

Member Data Documentation

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

Definition at line 114 of file LatinHyperCube.h.

Referenced by fillBins_m(), and map2domain_m().

double LatinHyperCube::binsize_m
private

Definition at line 115 of file LatinHyperCube.h.

Referenced by allocate(), and map2domain_m().

dist_t LatinHyperCube::dist_m
private

Definition at line 120 of file LatinHyperCube.h.

Referenced by create().

double LatinHyperCube::lower_m
private

Definition at line 118 of file LatinHyperCube.h.

Referenced by allocate(), and map2domain_m().

RNGStream* LatinHyperCube::RNGInstance_m
private

Definition at line 122 of file LatinHyperCube.h.

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

std::size_t LatinHyperCube::seed_m
private

Definition at line 124 of file LatinHyperCube.h.

Referenced by allocate().

double LatinHyperCube::upper_m
private

Definition at line 117 of file LatinHyperCube.h.

Referenced by allocate().


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