Revision 441, 0.9 kB
(checked in by vbarta, 15 years ago)
|
added configurable tests for egamma
|
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 | |
---|
| 24 | namespace bdm |
---|
| 25 | { |
---|
| 26 | |
---|
| 27 | class epdf_harness : public root |
---|
| 28 | { |
---|
| 29 | private: |
---|
| 30 | shared_ptr<epdf> hepdf; |
---|
| 31 | vec mean; |
---|
| 32 | vec variance; |
---|
| 33 | mat support; |
---|
| 34 | int nsamples; |
---|
| 35 | double integral; |
---|
[441] | 36 | mat R; |
---|
[436] | 37 | |
---|
| 38 | public: |
---|
[439] | 39 | epdf_harness():nsamples(100), integral(0) { } |
---|
[436] | 40 | |
---|
[439] | 41 | virtual void test(); |
---|
[436] | 42 | |
---|
| 43 | void from_setting(const Setting &set); |
---|
[439] | 44 | |
---|
| 45 | protected: |
---|
| 46 | epdf *get_epdf() { return hepdf.get(); } |
---|
[436] | 47 | }; |
---|
| 48 | |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | #endif |
---|