Uniform distribution. More...
#include <itpp/base/random.h>
Public Member Functions | |
| Uniform_RNG (double min=0, double max=1.0) | |
| Constructor. Set min, max and seed. | |
| void | setup (double min, double max) |
| set min and max | |
| void | get_setup (double &min, double &max) const |
| get parameters | |
| double | operator() () |
| Get one sample. | |
| vec | operator() (int n) |
| Get a sample vector. | |
| mat | operator() (int h, int w) |
| Get a sample matrix. | |
| double | sample () |
| Get a Uniformly distributed [0,1) sample. | |
| void | sample_vector (int size, vec &out) |
| Get a Uniformly distributed [0,1) vector. | |
| void | sample_matrix (int rows, int cols, mat &out) |
| Get a Uniformly distributed [0,1) matrix. | |
Constructor. Set min, max and seed.
Definition at line 339 of file random.cpp.
References itpp::max(), itpp::min(), and setup().
set min and max
Definition at line 344 of file random.cpp.
References itpp::max(), and itpp::min().
Referenced by Uniform_RNG().
|
inline |
|
inline |
|
inline |
Get a Uniformly distributed [0,1) vector.
Definition at line 384 of file random.h.
References itpp::Array< T >::set_size(), and itpp::Array< T >::size().
Get a Uniformly distributed [0,1) matrix.
Definition at line 389 of file random.h.
References itpp::Array< T >::set_size().
Generated on Mon Apr 22 2024 09:45:27 for IT++ by Doxygen 1.9.8