root/library/tests/test_util.h @ 484

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
19namespace bdm {
20
21class 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*/
28std::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*/
37bool remove_all ( const char *path );
38
39double normcoef ( const epdf *ep, const itpp::vec &xb, const itpp::vec &yb,
40                  int xn = 100, int yn = 100 );
41
42itpp::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
Note: See TracBrowser for help on using the browser.