OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
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 &args, const Comm::Bundle_t &comm)
 
- Public Member Functions inherited from SamplingMethod
virtual ~SamplingMethod ()
 

Private Attributes

dist_t dist_m
 
RNGStreamRNGInstance_m
 
std::size_t seed_m
 

Detailed Description

Definition at line 9 of file Normal.h.

Member Typedef Documentation

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

Definition at line 13 of file Normal.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file Normal.h.

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

Definition at line 22 of file Normal.h.

Normal::~Normal ( )
inline

Definition at line 28 of file Normal.h.

References RNGStream::deleteInstance(), and RNGInstance_m.

Here is the call graph for this function:

Member Function Documentation

void Normal::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 37 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:

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

Implements SamplingMethod.

Definition at line 33 of file Normal.h.

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

Here is the call graph for this function:

Member Data Documentation

dist_t Normal::dist_m
private

Definition at line 43 of file Normal.h.

Referenced by create().

RNGStream* Normal::RNGInstance_m
private

Definition at line 45 of file Normal.h.

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

std::size_t Normal::seed_m
private

Definition at line 47 of file Normal.h.

Referenced by allocate().


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