Revision 477, 1.2 kB
(checked in by mido, 15 years ago)
|
panove, vite, jak jsem peclivej na upravu kodu.. snad se vam bude libit:) konfigurace je v souboru /system/astylerc
|
Line | |
---|
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> |
---|
17 | #include "itpp_ext.h" |
---|
18 | |
---|
19 | namespace bdm { |
---|
20 | |
---|
21 | class epdf; |
---|
22 | |
---|
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 | |
---|
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 | |
---|
45 | } |
---|
46 | |
---|
47 | #endif |
---|