Revision 477, 1.1 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
|
Rev | Line | |
---|
[436] | 1 | /*! |
---|
| 2 | \file |
---|
| 3 | \brief Support for testing descendants of epdf. |
---|
| 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 EPDF_HARNESS_H |
---|
| 14 | #define EPDF_HARNESS_H |
---|
| 15 | |
---|
| 16 | #define BDMLIB // not an ideal way to prevent double registration of UI factories... |
---|
| 17 | |
---|
| 18 | #include "bdmroot.h" |
---|
| 19 | #include "itpp_ext.h" |
---|
| 20 | #include "shared_ptr.h" |
---|
| 21 | #include "base/bdmbase.h" |
---|
| 22 | #include "base/user_info.h" |
---|
| 23 | |
---|
[477] | 24 | namespace bdm { |
---|
[436] | 25 | |
---|
[477] | 26 | class epdf_harness : public root { |
---|
[436] | 27 | private: |
---|
[477] | 28 | shared_ptr<epdf> hepdf; |
---|
| 29 | vec mean; |
---|
| 30 | vec variance; |
---|
| 31 | mat support; |
---|
| 32 | vec nbins; |
---|
| 33 | int nsamples; |
---|
| 34 | mat R; |
---|
| 35 | shared_ptr<RV> mrv; |
---|
| 36 | double tolerance; |
---|
[436] | 37 | |
---|
| 38 | public: |
---|
[477] | 39 | static void test_config ( const char *config_file_name ); |
---|
[436] | 40 | |
---|
[477] | 41 | epdf_harness() : nsamples ( 1000 ), tolerance ( 0.1 ) { } |
---|
[436] | 42 | |
---|
[477] | 43 | virtual void test ( const char *config_name, int idx ); |
---|
[456] | 44 | |
---|
[477] | 45 | void from_setting ( const Setting &set ); |
---|
[439] | 46 | |
---|
| 47 | protected: |
---|
[477] | 48 | epdf *get_epdf() { |
---|
| 49 | return hepdf.get(); |
---|
| 50 | } |
---|
[456] | 51 | |
---|
[477] | 52 | double get_tolerance() const { |
---|
| 53 | return tolerance; |
---|
| 54 | } |
---|
[436] | 55 | }; |
---|
| 56 | |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | #endif |
---|