OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Private Attributes | List of all members
Uniform< T > Class Template Reference

#include <Uniform.h>

Inheritance diagram for Uniform< T >:
Inheritance graph
[legend]
Collaboration diagram for Uniform< T >:
Collaboration graph
[legend]

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 &args, const Comm::Bundle_t &comm)
 
T getNext ()
 
- Public Member Functions inherited from SamplingMethod
virtual ~SamplingMethod ()
 

Private Attributes

dist_t dist_m
 
RNGStreamRNGInstance_m
 
std::size_t seed_m
 

Detailed Description

template<typename T>
class Uniform< T >

Definition at line 10 of file Uniform.h.

Member Typedef Documentation

template<typename T>
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 18 of file Uniform.h.

Constructor & Destructor Documentation

template<typename T>
Uniform< T >::Uniform ( T  lower,
T  upper 
)
inline

Definition at line 20 of file Uniform.h.

template<typename T>
Uniform< T >::Uniform ( T  lower,
T  upper,
std::size_t  seed 
)
inline

Definition at line 26 of file Uniform.h.

template<typename T>
Uniform< T >::~Uniform ( )
inline

Definition at line 32 of file Uniform.h.

Member Function Documentation

template<typename T>
void Uniform< T >::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 41 of file Uniform.h.

Referenced by SampleRandomizedSequence< T >::allocate().

template<typename T>
void Uniform< T >::create ( boost::shared_ptr< SampleIndividual > &  ind,
size_t  i 
)
inlinevirtual

Implements SamplingMethod.

Definition at line 37 of file Uniform.h.

template<typename T>
T Uniform< T >::getNext ( )
inline

Definition at line 46 of file Uniform.h.

Referenced by SampleRandomizedSequence< T >::create().

Member Data Documentation

template<typename T>
dist_t Uniform< T >::dist_m
private

Definition at line 51 of file Uniform.h.

Referenced by Uniform< size_t >::create(), and Uniform< size_t >::getNext().

template<typename T>
RNGStream* Uniform< T >::RNGInstance_m
private
template<typename T>
std::size_t Uniform< T >::seed_m
private

Definition at line 55 of file Uniform.h.

Referenced by Uniform< size_t >::allocate().


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