Sacado::Random< ScalarT > Class Template Reference

A random number generator that generates random numbers uniformly distributed in the interval (a,b). More...

#include <Sacado_Random.hpp>

Inheritance diagram for Sacado::Random< ScalarT >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Random ()
 Constructor.
 Random (ScalarT a_, ScalarT b_)
 Constructor.
 Random (ScalarT a_, ScalarT b_, int s)
 Constructor with seed value s.
 ~Random ()
 Destructor.
void setSeed (int s)
 Set seed to s.
ScalarT number ()
 Get random number.

Protected Member Functions

int checkSeed (const std::string &func, int s)

Protected Attributes

ScalarT a
 Lower bound of interval.
ScalarT b
 Upper bound of interval.
ScalarT seed
 Random number seed

Detailed Description

template<typename ScalarT>
class Sacado::Random< ScalarT >

A random number generator that generates random numbers uniformly distributed in the interval (a,b).

Definition at line 46 of file Sacado_Random.hpp.


Constructor & Destructor Documentation

template<typename ScalarT >
Sacado::Random< ScalarT >::Random (  )  [inline]

Constructor.

Definition at line 39 of file Sacado_RandomImp.hpp.

template<typename ScalarT>
Sacado::Random< ScalarT >::Random ( ScalarT  a_,
ScalarT  b_ 
) [inline]

Constructor.

Definition at line 51 of file Sacado_RandomImp.hpp.

template<typename ScalarT>
Sacado::Random< ScalarT >::Random ( ScalarT  a_,
ScalarT  b_,
int  s 
) [inline]

Constructor with seed value s.

Definition at line 63 of file Sacado_RandomImp.hpp.

template<typename ScalarT >
Sacado::Random< ScalarT >::~Random (  )  [inline]

Destructor.

Definition at line 73 of file Sacado_RandomImp.hpp.


Member Function Documentation

template<typename ScalarT >
void Sacado::Random< ScalarT >::setSeed ( int  s  )  [inline]

Set seed to s.

Definition at line 80 of file Sacado_RandomImp.hpp.

template<typename ScalarT >
ScalarT Sacado::Random< ScalarT >::number (  )  [inline]

Get random number.

Definition at line 89 of file Sacado_RandomImp.hpp.

template<typename ScalarT >
int Sacado::Random< ScalarT >::checkSeed ( const std::string &  func,
int  s 
) [inline, protected]

Definition at line 100 of file Sacado_RandomImp.hpp.


Member Data Documentation

template<typename ScalarT>
ScalarT Sacado::Random< ScalarT >::a [protected]

Lower bound of interval.

Definition at line 75 of file Sacado_Random.hpp.

template<typename ScalarT>
ScalarT Sacado::Random< ScalarT >::b [protected]

Upper bound of interval.

Definition at line 78 of file Sacado_Random.hpp.

template<typename ScalarT>
ScalarT Sacado::Random< ScalarT >::seed [protected]

Random number seed

Definition at line 81 of file Sacado_Random.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:19:44 2011 for Sacado Package Browser (Single Doxygen Collection) by  doxygen 1.6.3