Revision 436, 1.1 kB
(checked in by vbarta, 15 years ago)
|
moved egiw_test to testsuite (partially converted to a configurable test); added public method clearing RVs
|
Rev | Line | |
---|
[425] | 1 | /*! |
---|
| 2 | \file |
---|
| 3 | \brief Utility functions for BDM unit tests. |
---|
| 4 | \author Vaclav Barta. |
---|
| 5 | |
---|
| 6 | ----------------------------------- |
---|
| 7 | BDM++ - C++ library for Bayesian Decision Making under Uncertainty |
---|
| 8 | |
---|
| 9 | Using IT++ for numerical operations |
---|
| 10 | ----------------------------------- |
---|
| 11 | */ |
---|
| 12 | |
---|
| 13 | #ifndef TEST_UTIL_H |
---|
| 14 | #define TEST_UTIL_H |
---|
| 15 | |
---|
| 16 | #include <string> |
---|
[436] | 17 | #include "itpp_ext.h" |
---|
[425] | 18 | |
---|
| 19 | namespace bdm { |
---|
| 20 | |
---|
[436] | 21 | class epdf; |
---|
| 22 | |
---|
[425] | 23 | /*! \brief Non-general but simple file load. |
---|
| 24 | |
---|
| 25 | Handles only files smaller than 8KB which do not contain '\0' |
---|
| 26 | characters, but for testing that should be enough. |
---|
| 27 | */ |
---|
| 28 | std::string load_test_file(const char *fname); |
---|
| 29 | |
---|
| 30 | /*! \brief Recursively removes directories and files. |
---|
| 31 | |
---|
| 32 | path is the name (absolute or relative) of the file or directory to |
---|
| 33 | be removed (must not be empty). Returns true on success, false when |
---|
| 34 | path couldn't be removed because it didn't exist, throws an |
---|
| 35 | exception otherwise. |
---|
| 36 | */ |
---|
| 37 | bool remove_all(const char *path); |
---|
| 38 | |
---|
[436] | 39 | double normcoef(const epdf *ep, const itpp::vec &xb, const itpp::vec &yb, |
---|
| 40 | int xn = 100, int yn = 100); |
---|
| 41 | |
---|
| 42 | itpp::vec num_mean2(const epdf *ep, const itpp::vec &xb, const itpp::vec &yb, |
---|
| 43 | int xn = 100, int yn = 100); |
---|
| 44 | |
---|
[425] | 45 | } |
---|
| 46 | |
---|
| 47 | #endif |
---|