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

Base class for the random number generators. More...

#include <mklrand.hpp>

Inheritance diagram for mklrand::mkl_randbase:
Inheritance graph
[legend]

Public Member Functions

 mkl_randbase ()
 Default constructor. More...
 
 ~mkl_randbase ()
 Default destructor. More...
 
virtual void fill ()
 Fill the buffer with new random numbers. 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...
 

Protected Attributes

int arr_size
 
int curr
 
VSLStreamStatePtr stream
 

Detailed Description

Base class for the random number generators.

Constructor & Destructor Documentation

mklrand::mkl_randbase::mkl_randbase ( )
inline

Default constructor.

mklrand::mkl_randbase::~mkl_randbase ( )
inline

Default destructor.

Member Function Documentation

void mklrand::mkl_randbase::change_seed ( int  seed)

Change the current random seed.

Parameters
seedThe new seed.
virtual void mklrand::mkl_randbase::fill ( )
inlinevirtual

Fill the buffer with new random numbers.

Reimplemented in mklrand::mkl_lnrand, mklrand::mkl_irand, and mklrand::mkl_drand.

void mklrand::mkl_randbase::load ( const char *  name)
inline

Load a random number generator state.

Parameters
nameThe name of the file which the state loaded from.
void mklrand::mkl_randbase::save ( const char *  name)
inline

Save the state of the random number generator.

Parameters
nameThe name of the file which the state will be saved to.

Member Data Documentation

int mklrand::mkl_randbase::arr_size
protected
int mklrand::mkl_randbase::curr
protected
VSLStreamStatePtr mklrand::mkl_randbase::stream
protected

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