contrib/mul/pdf1d/pdf1d_compare_to_pdf_ks.h
Go to the documentation of this file.
00001 // This is mul/pdf1d/pdf1d_compare_to_pdf_ks.h
00002 #ifndef pdf1d_compare_to_pdf_ks_h
00003 #define pdf1d_compare_to_pdf_ks_h
00004 
00005 //:
00006 // \file
00007 // \author Tim Cootes
00008 // \brief Test if data from a given distribution using Kolmogorov-Smirnov
00009 
00010 #include <pdf1d/pdf1d_compare_to_pdf.h>
00011 #include <vcl_iosfwd.h>
00012 
00013 // \brief Test if data from a given distribution using Kolmogorov-Smirnov
00014 class pdf1d_compare_to_pdf_ks : public pdf1d_compare_to_pdf
00015 {
00016  public:
00017 
00018   //: Dflt ctor
00019   pdf1d_compare_to_pdf_ks();
00020 
00021   //: Destructor
00022   virtual ~pdf1d_compare_to_pdf_ks();
00023 
00024   //: Test whether data came from the given distribution
00025   virtual double compare(const double* data, int n, const pdf1d_pdf& pdf);
00026 
00027   //: Version number for I/O
00028   short version_no() const;
00029 
00030   //: Name of the class
00031   virtual vcl_string is_a() const;
00032 
00033   //: Does the name of the class match the argument?
00034   virtual bool is_class(vcl_string const& s) const;
00035 
00036   //: Create a copy on the heap and return base class pointer
00037   virtual pdf1d_compare_to_pdf* clone() const;
00038 
00039   //: Print class to os
00040   virtual void print_summary(vcl_ostream& os) const;
00041 
00042   //: Save class to binary file stream
00043   virtual void b_write(vsl_b_ostream& bfs) const;
00044 
00045   //: Load class from binary file stream
00046   virtual void b_read(vsl_b_istream& bfs);
00047 };
00048 
00049 #endif // pdf1d_compare_to_pdf_ks_h