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