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

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

#include <mklrand.hpp>

Inheritance diagram for 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...
 
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...
 

Protected Attributes

int arr_size
 
int curr
 
VSLStreamStatePtr stream
 

Detailed Description

Base class for the random number generators.

Constructor & Destructor Documentation

mkl_randbase::mkl_randbase ( )
inline

Default constructor.

mkl_randbase::~mkl_randbase ( )
inline

Default destructor.

Member Function Documentation

virtual void mkl_randbase::change_seed ( int  seed)
virtual

Change the current random seed.

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

Fill the buffer with new random numbers.

Reimplemented in mkl_lnrand, mkl_irand, and mkl_drand.

void 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 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 mkl_randbase::arr_size
protected
int mkl_randbase::curr
protected
VSLStreamStatePtr mkl_randbase::stream
protected

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