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

#include <Normal.h>

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

Public Types

typedef std::normal_distribution< double > dist_t
 

Public Member Functions

 Normal (double lower, double upper)
 
 Normal (double lower, double upper, std::size_t seed)
 
 ~Normal ()
 
void create (boost::shared_ptr< SampleIndividual > &ind, size_t i)
 
void allocate (const CmdArguments_t &, 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
 
virtual void allocate (const CmdArguments_t &, const Comm::Bundle_t &)
 

Private Attributes

dist_t dist_m
 
RNGStreamRNGInstance_m
 
std::size_t seed_m
 

Detailed Description

Definition at line 26 of file Normal.h.

Member Typedef Documentation

◆ dist_t

typedef std::normal_distribution<double> Normal::dist_t

Definition at line 30 of file Normal.h.

Constructor & Destructor Documentation

◆ Normal() [1/2]

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

Definition at line 33 of file Normal.h.

◆ Normal() [2/2]

Normal::Normal ( double  lower,
double  upper,
std::size_t  seed 
)
inline

Definition at line 39 of file Normal.h.

◆ ~Normal()

Normal::~Normal ( )
inline

Definition at line 45 of file Normal.h.

References RNGStream::deleteInstance(), and RNGInstance_m.

Here is the call graph for this function:

Member Function Documentation

◆ allocate()

void Normal::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 54 of file Normal.h.

References RNGStream::getInstance(), Comm::Bundle_t::island_id, RNGInstance_m, and seed_m.

Here is the call graph for this function:

◆ create()

void Normal::create ( boost::shared_ptr< SampleIndividual > &  ind,
size_t  i 
)
inlinevirtual

Implements SamplingMethod.

Definition at line 50 of file Normal.h.

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

Here is the call graph for this function:

Member Data Documentation

◆ dist_m

dist_t Normal::dist_m
private

Definition at line 60 of file Normal.h.

Referenced by create().

◆ RNGInstance_m

RNGStream* Normal::RNGInstance_m
private

Definition at line 62 of file Normal.h.

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

◆ seed_m

std::size_t Normal::seed_m
private

Definition at line 64 of file Normal.h.

Referenced by allocate().


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