00001
00013 #ifndef MPDF_HARNESS_H
00014 #define MPDF_HARNESS_H
00015
00016 #define BDMLIB // not an ideal way to prevent double registration of UI factories...
00017
00018 #include "bdmroot.h"
00019 #include "itpp_ext.h"
00020 #include "shared_ptr.h"
00021 #include "base/bdmbase.h"
00022 #include "base/user_info.h"
00023
00024 namespace bdm
00025 {
00026
00027 class mpdf_harness : public root
00028 {
00029 private:
00030 shared_ptr<mpdf> hmpdf;
00031 vec cond;
00032 vec mean;
00033 int nsamples;
00034 mat R;
00035 double tolerance;
00036
00037 public:
00038 static void test_config(const char *config_file_name);
00039
00040 mpdf_harness():nsamples(1000), tolerance(0.1) { }
00041
00042 virtual void test(const char *config_name, int idx);
00043
00044 void from_setting(const Setting &set);
00045
00046 protected:
00047 mpdf *get_mpdf() { return hmpdf.get(); }
00048 };
00049
00050 }
00051
00052 #endif