Go to the documentation of this file.00001
00002 #ifndef pdf1d_compare_to_pdf_h
00003 #define pdf1d_compare_to_pdf_h
00004
00005
00006
00007
00008
00009
00010 #include <pdf1d/pdf1d_pdf.h>
00011 #include <pdf1d/pdf1d_builder.h>
00012 #include <vnl/vnl_fwd.h>
00013 #include <mbl/mbl_cloneable_ptr.h>
00014 #include <vsl/vsl_binary_io.h>
00015 #include <vcl_string.h>
00016 #include <vcl_iosfwd.h>
00017
00018
00019
00020
00021
00022
00023
00024 class pdf1d_compare_to_pdf
00025 {
00026 protected:
00027
00028 mbl_cloneable_ptr<pdf1d_pdf> pdf_;
00029 public:
00030
00031
00032 pdf1d_compare_to_pdf();
00033
00034
00035 virtual ~pdf1d_compare_to_pdf();
00036
00037
00038 virtual double compare(const double* data, int n, const pdf1d_pdf& pdf) =0;
00039
00040
00041
00042
00043
00044 virtual double bootstrap_compare(vnl_vector<double>& B,
00045 const double* data, int n,
00046 const pdf1d_pdf& pdf, int n_trials);
00047
00048
00049
00050 virtual double compare_form(const double* data, int n,
00051 const pdf1d_builder& builder);
00052
00053
00054
00055
00056
00057
00058 virtual double bootstrap_compare_form(vnl_vector<double>& B,
00059 const double* data, int n,
00060 const pdf1d_builder& builder, int n_trials);
00061
00062
00063 short version_no() const;
00064
00065
00066 virtual vcl_string is_a() const;
00067
00068
00069 virtual bool is_class(vcl_string const& s) const;
00070
00071
00072 virtual pdf1d_compare_to_pdf* clone() const = 0;
00073
00074
00075 virtual void print_summary(vcl_ostream& os) const = 0;
00076
00077
00078 virtual void b_write(vsl_b_ostream& bfs) const = 0;
00079
00080
00081 virtual void b_read(vsl_b_istream& bfs) = 0;
00082 };
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 void vsl_add_to_binary_loader(const pdf1d_compare_to_pdf& b);
00094
00095
00096 void vsl_b_write(vsl_b_ostream& bfs, const pdf1d_compare_to_pdf& b);
00097
00098
00099 void vsl_b_read(vsl_b_istream& bfs, pdf1d_compare_to_pdf& b);
00100
00101
00102 void vsl_print_summary(vcl_ostream& os,const pdf1d_compare_to_pdf& b);
00103
00104
00105 void vsl_print_summary(vcl_ostream& os,const pdf1d_compare_to_pdf* b);
00106
00107
00108 vcl_ostream& operator<<(vcl_ostream& os,const pdf1d_compare_to_pdf& b);
00109
00110
00111 vcl_ostream& operator<<(vcl_ostream& os,const pdf1d_compare_to_pdf* b);
00112
00113 #endif // pdf1d_compare_to_pdf_h