Added new RNG and test files for it
This commit is contained in:
parent
18f6c31513
commit
46b6a9e17a
11 changed files with 561 additions and 35 deletions
22
eo/test/t-eoUniform.cpp
Normal file
22
eo/test/t-eoUniform.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// t-eouniform
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <iostream> // cout
|
||||
#include <strstream> // ostrstream, istrstream
|
||||
#include <eoUniform.h> // eoBin
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
main() {
|
||||
eoUniform<float> u1(-2.5,3.5);
|
||||
eoUniform<double> u2(0.003, 0 );
|
||||
eoUniform<unsigned long> u3( 10000U, 10000000U);
|
||||
cout << "u1\t\tu2\t\tu3" << endl;
|
||||
for ( unsigned i = 0; i < 100; i ++) {
|
||||
cout << u1() << "\t" << u2() << "\t" << u3() << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
Reference in a new issue