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
mkl_lnrand Class Reference

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

#include <mklrand.hpp>

Inheritance diagram for mkl_lnrand:
Inheritance graph
[legend]
Collaboration diagram for 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 mkl_randbase
 mkl_randbase ()
 Default constructor. More...
 
 ~mkl_randbase ()
 Default destructor. More...
 
virtual 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 mkl_randbase
int arr_size
 
int curr
 
VSLStreamStatePtr stream
 

Detailed Description

Generator for random numbers on a lognormal distribution.

Constructor & Destructor Documentation

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.
mkl_lnrand::~mkl_lnrand ( )

Default destructor.

Member Function Documentation

void mkl_lnrand::fill ( )
virtual

Fill the buffer with new random numbers.

Reimplemented from mkl_randbase.

double mkl_lnrand::gen ( )

Return a single random number.


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