MC_HAMR  v0.01
Monte Carlo Simulation Software for Atomistic Models of Magnetic Materials for Heat Assisted Magnetic Recording
Public Member Functions | List of all members
mklrand::mkl_lnrand Class Reference

Generator for random numbers on a lognormal distribution. More...

#include <mklrand.hpp>

Inheritance diagram for mklrand::mkl_lnrand:
Inheritance graph
[legend]
Collaboration diagram for mklrand::mkl_lnrand:
Collaboration graph
[legend]

Public Member Functions

 mkl_lnrand (double m, double sd, int size, int seed=1)
 Constructor. More...
 
 ~mkl_lnrand ()
 Default destructor. More...
 
double gen ()
 Return a single random number. More...
 
void fill ()
 Fill the buffer with new random numbers. More...
 
- Public Member Functions inherited from mklrand::mkl_randbase
 mkl_randbase ()
 Default constructor. More...
 
 ~mkl_randbase ()
 Default destructor. More...
 
void change_seed (int seed)
 Change the current random seed. More...
 
void save (const char *name)
 Save the state of the random number generator. More...
 
void load (const char *name)
 Load a random number generator state. More...
 

Additional Inherited Members

- Protected Attributes inherited from mklrand::mkl_randbase
int arr_size
 
int curr
 
VSLStreamStatePtr stream
 

Detailed Description

Generator for random numbers on a lognormal distribution.

Constructor & Destructor Documentation

mklrand::mkl_lnrand::mkl_lnrand ( double  m,
double  sd,
int  size,
int  seed = 1 
)

Constructor.

Parameters
seedThe inital seed of the random number generator.
sizeThe size of the buffer for RNG storage.
mThe logarithmic mean of the distribution.
sdThe logarithmic standard devaiation of the distribution.
mklrand::mkl_lnrand::~mkl_lnrand ( )

Default destructor.

Member Function Documentation

void mklrand::mkl_lnrand::fill ( )
virtual

Fill the buffer with new random numbers.

Reimplemented from mklrand::mkl_randbase.

double mklrand::mkl_lnrand::gen ( )

Return a single random number.


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