Tiny Vector Matrix library using Expression Templates | Sourceforge Project Page |
#include <tvmet/util/Random.h>
On each access this class returns a new random number using std::rand(). The range generated is templated by MIN and MAX.
#include <algorithm>
tvmet::Random<int, 0, 100> random;
std::generate(m1.begin(), m1.end(), random());
Public Types | |
typedef T | value_type |
typedef std::complex< T > | value_type |
Public Member Functions | |
Random () | |
value_type | operator() () |
Random () | |
value_type | operator() () |
Static Private Attributes | |
static unsigned int | s_seed |
typedef T tvmet::util::Random< T, MIN, MAX >::value_type |
typedef std::complex<T> tvmet::util::Random< T, MIN, MAX >::value_type |
tvmet::util::Random< T, MIN, MAX >::Random | ( | ) | [inline] |
tvmet::util::Random< T, MIN, MAX >::Random | ( | ) | [inline] |
value_type tvmet::util::Random< T, MIN, MAX >::operator() | ( | ) | [inline] |
value_type tvmet::util::Random< T, MIN, MAX >::operator() | ( | ) | [inline] |
unsigned int tvmet::util::Random< T, MIN, MAX >::s_seed [inline, static, private] |
Author: |