- Timestamp:
- 08/22/09 15:36:24 (15 years ago)
- Location:
- library
- Files:
-
- 1 added
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/itpp_ext.cpp
r579 r580 378 378 379 379 class RandunStorage{ 380 const doubleA;381 const doubleM;380 const int A; 381 const int M; 382 382 static double seed; 383 383 static int counter; … … 385 385 RandunStorage(): A(16807), M(2147483647) {}; 386 386 void set_seed(double seed0){seed=seed0;} 387 double get(){seed=mod(A*seed,M); counter++; return seed/M;} 387 double get(){ 388 int tmp=mod(A*seed,M); 389 seed =tmp; 390 counter++; 391 return seed/M;} 388 392 }; 389 393 static RandunStorage randun_global_storage; -
library/tests/CMakeLists.txt
r563 r580 40 40 # using UnitTest++ 41 41 add_executable(testsuite datalink_test.cpp egiw_test.cpp emix_test.cpp epdf_test.cpp logger_test.cpp merger_test.cpp 42 mpdf_test.cpp r ectangular_support_test.cpp rv_test.cpp shared_ptr_test.cpp square_mat_test.cpp testsuite.cpp user_info_test.cpp)42 mpdf_test.cpp randun_test.cpp rectangular_support_test.cpp rv_test.cpp shared_ptr_test.cpp square_mat_test.cpp testsuite.cpp user_info_test.cpp) 43 43 target_link_libraries(testsuite testutil unittest) 44 44 LINK_EXEC(testsuite)