Public Member Functions | Protected Attributes
pdf1d_compare_to_pdf_ks Class Reference

#include <pdf1d_compare_to_pdf_ks.h>

Inheritance diagram for pdf1d_compare_to_pdf_ks:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 pdf1d_compare_to_pdf_ks ()
 Dflt ctor.
virtual ~pdf1d_compare_to_pdf_ks ()
 Destructor.
virtual double compare (const double *data, int n, const pdf1d_pdf &pdf)
 Test whether data came from the given distribution.
short version_no () const
 Version number for I/O.
virtual vcl_string is_a () const
 Name of the class.
virtual bool is_class (vcl_string const &s) const
 Does the name of the class match the argument?.
virtual pdf1d_compare_to_pdfclone () const
 Create a copy on the heap and return base class pointer.
virtual void print_summary (vcl_ostream &os) const
 Print class to os.
virtual void b_write (vsl_b_ostream &bfs) const
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)
 Load class from binary file stream.
virtual double bootstrap_compare (vnl_vector< double > &B, const double *data, int n, const pdf1d_pdf &pdf, int n_trials)
 Test whether data came from the given distribution, using bootstrap.
virtual double compare_form (const double *data, int n, const pdf1d_builder &builder)
 Test whether data has form of the given distribution.
virtual double bootstrap_compare_form (vnl_vector< double > &B, const double *data, int n, const pdf1d_builder &builder, int n_trials)
 Test whether data has form of the given distribution.

Protected Attributes

mbl_cloneable_ptr< pdf1d_pdfpdf_
 Workspace for PDFs.

Detailed Description

Definition at line 14 of file pdf1d_compare_to_pdf_ks.h.


Constructor & Destructor Documentation

pdf1d_compare_to_pdf_ks::pdf1d_compare_to_pdf_ks ( )

Dflt ctor.

Definition at line 21 of file pdf1d_compare_to_pdf_ks.cxx.

pdf1d_compare_to_pdf_ks::~pdf1d_compare_to_pdf_ks ( ) [virtual]

Destructor.

Definition at line 29 of file pdf1d_compare_to_pdf_ks.cxx.


Member Function Documentation

void pdf1d_compare_to_pdf_ks::b_read ( vsl_b_istream bfs) [virtual]

Load class from binary file stream.

Implements pdf1d_compare_to_pdf.

Definition at line 131 of file pdf1d_compare_to_pdf_ks.cxx.

void pdf1d_compare_to_pdf_ks::b_write ( vsl_b_ostream bfs) const [virtual]

Save class to binary file stream.

Implements pdf1d_compare_to_pdf.

Definition at line 122 of file pdf1d_compare_to_pdf_ks.cxx.

double pdf1d_compare_to_pdf::bootstrap_compare ( vnl_vector< double > &  B,
const double *  data,
int  n,
const pdf1d_pdf pdf,
int  n_trials 
) [virtual, inherited]

Test whether data came from the given distribution, using bootstrap.

Repeatedly resamples n values from data[0..n-1] and compares with the given pdf. Individual comparisons are returned in B.

Returns:
Mean of B

Definition at line 35 of file pdf1d_compare_to_pdf.cxx.

double pdf1d_compare_to_pdf::bootstrap_compare_form ( vnl_vector< double > &  B,
const double *  data,
int  n,
const pdf1d_builder builder,
int  n_trials 
) [virtual, inherited]

Test whether data has form of the given distribution.

Repeatedly resamples n values from data[0..n-1] and calls compare_form(). Individual comparisons are returned in B.

Returns:
Mean of B

Reimplemented in pdf1d_compare_to_pdf_bhat.

Definition at line 75 of file pdf1d_compare_to_pdf.cxx.

pdf1d_compare_to_pdf * pdf1d_compare_to_pdf_ks::clone ( ) const [virtual]

Create a copy on the heap and return base class pointer.

Implements pdf1d_compare_to_pdf.

Definition at line 104 of file pdf1d_compare_to_pdf_ks.cxx.

double pdf1d_compare_to_pdf_ks::compare ( const double *  data,
int  n,
const pdf1d_pdf pdf 
) [virtual]

Test whether data came from the given distribution.

Implements pdf1d_compare_to_pdf.

Definition at line 36 of file pdf1d_compare_to_pdf_ks.cxx.

double pdf1d_compare_to_pdf::compare_form ( const double *  data,
int  n,
const pdf1d_builder builder 
) [virtual, inherited]

Test whether data has form of the given distribution.

Default behaviour is to build pdf from data and then compare data with pdf

Definition at line 64 of file pdf1d_compare_to_pdf.cxx.

vcl_string pdf1d_compare_to_pdf_ks::is_a ( ) const [virtual]

Name of the class.

Reimplemented from pdf1d_compare_to_pdf.

Definition at line 77 of file pdf1d_compare_to_pdf_ks.cxx.

bool pdf1d_compare_to_pdf_ks::is_class ( vcl_string const &  s) const [virtual]

Does the name of the class match the argument?.

Reimplemented from pdf1d_compare_to_pdf.

Definition at line 86 of file pdf1d_compare_to_pdf_ks.cxx.

void pdf1d_compare_to_pdf_ks::print_summary ( vcl_ostream &  os) const [virtual]

Print class to os.

Implements pdf1d_compare_to_pdf.

Definition at line 113 of file pdf1d_compare_to_pdf_ks.cxx.

short pdf1d_compare_to_pdf_ks::version_no ( ) const

Version number for I/O.

Reimplemented from pdf1d_compare_to_pdf.

Definition at line 95 of file pdf1d_compare_to_pdf_ks.cxx.


Member Data Documentation

Workspace for PDFs.

Definition at line 28 of file pdf1d_compare_to_pdf.h.


The documentation for this class was generated from the following files: