OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Normal Class Reference

#include <Normal.h>

Inheritance diagram for Normal:
Collaboration diagram for Normal:

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 (std::shared_ptr< SampleIndividual > &ind, size_t i)
void allocate (const CmdArguments_t &, const Comm::Bundle_t &comm)

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.

References dist_m, RNGInstance_m, and seed_m.

◆ Normal() [2/2]

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

Definition at line 39 of file Normal.h.

References dist_m, RNGInstance_m, and seed_m.

◆ ~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 ( std::shared_ptr< SampleIndividual > & ind,
size_t i )
inlinevirtual

Implements SamplingMethod.

Definition at line 50 of file Normal.h.

References dist_m, and RNGInstance_m.

Member Data Documentation

◆ dist_m

dist_t Normal::dist_m
private

Definition at line 60 of file Normal.h.

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

◆ RNGInstance_m

RNGStream* Normal::RNGInstance_m
private

Definition at line 62 of file Normal.h.

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

◆ seed_m

std::size_t Normal::seed_m
private

Definition at line 64 of file Normal.h.

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


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