OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
#include <Uniform.h>
Public Types | |
typedef std::conditional< std::is_integral< T >::value, std::uniform_int_distribution< T >, std::uniform_real_distribution< T > >::type | dist_t |
Public Member Functions | |
Uniform (T lower, T upper) | |
Uniform (T lower, T upper, std::size_t seed) | |
~Uniform () | |
void | create (boost::shared_ptr< SampleIndividual > &ind, size_t i) |
void | allocate (const CmdArguments_t &, const Comm::Bundle_t &comm) |
T | getNext () |
![]() | |
virtual | ~SamplingMethod () |
virtual void | create (boost::shared_ptr< SampleIndividual > &ind, size_t i)=0 |
virtual void | allocate (const CmdArguments_t &, const Comm::Bundle_t &) |
Private Attributes | |
dist_t | dist_m |
RNGStream * | RNGInstance_m |
std::size_t | seed_m |
typedef std::conditional<std::is_integral<T>::value,std::uniform_int_distribution<T>,std::uniform_real_distribution<T>>::type Uniform< T >::dist_t |
Definition at line 52 of file Uniform.h.
References RNGStream::deleteInstance(), and Uniform< T >::RNGInstance_m.
|
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.
args | samler arguments |
comm | sampler communicator |
Reimplemented from SamplingMethod.
Definition at line 61 of file Uniform.h.
References RNGStream::getInstance(), Comm::Bundle_t::island_id, Uniform< T >::RNGInstance_m, and Uniform< T >::seed_m.
Referenced by SampleRandomizedSequence< T >::allocate().
|
inlinevirtual |
Implements SamplingMethod.
Definition at line 57 of file Uniform.h.
References Uniform< T >::dist_m, RNGStream::getNext(), and Uniform< T >::RNGInstance_m.
|
inline |
Definition at line 66 of file Uniform.h.
References Uniform< T >::dist_m, RNGStream::getNext(), and Uniform< T >::RNGInstance_m.
Referenced by SampleRandomizedSequence< T >::create().
Definition at line 71 of file Uniform.h.
Referenced by Uniform< T >::create(), and Uniform< T >::getNext().
Definition at line 73 of file Uniform.h.
Referenced by Uniform< T >::allocate(), Uniform< T >::create(), Uniform< T >::getNext(), and Uniform< T >::~Uniform().
|
private |
Definition at line 75 of file Uniform.h.
Referenced by Uniform< T >::allocate().