- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

# epdf_harness.h

Go to the documentation of this file.

    00001
    00013 #ifndef EPDF_HARNESS_H
    00014 #define EPDF_HARNESS_H
    00015
    00016 #include "bdmroot.h"
    00017 #include "itpp_ext.h"
    00018 #include "shared_ptr.h"
    00019 #include "base/bdmbase.h"
    00020 #include "base/user_info.h"
    00021 #include "stat/emix.h"
    00022
    00023 namespace bdm {
    00024
    00025 class epdf_harness : public root {
    00026 private:
    00027         shared_ptr<epdf> hepdf;
    00028         vec mean;
    00029         vec variance;
    00030         mat support;
    00031         ivec nbins;
    00032         int nsamples;
    00033         mat R;
    00034         shared_ptr<RV> mrv;
    00035         double tolerance;
    00036
    00037 public:
    00038         static void test_config ( const char *config_file_name );
    00039
    00040         epdf_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         epdf *get_epdf() {
    00048                 return hepdf.get();
    00049         }
    00050
    00051         double get_tolerance() const {
    00052                 return tolerance;
    00053         }
    00054
    00055 private:
    00056         // assumes support is valid
    00057         void check_support_mean();
    00058
    00059         // assumes support is valid
    00060         void check_support_integral();
    00061
    00062         // assumes R is valid - it probably shouldn't, but calling it
    00063         // unconditionally leads to a lot of not implemented
    00064         // functions...
    00065         void check_sample_mean();
    00066
    00067         // assumes R is valid
    00068         void check_covariance();
    00069
    00070         // assumes marginal_rv is valid
    00071         void check_cond_mean( mprod &mep );
    00072
    00073         // assumes marginal_rv and R are valid
    00074         void check_cond_covariance( mprod &mep );
    00075 };
    00076 UIREGISTER(epdf_harness);
    00077
    00078 }
    00079
    00080 #endif