Public Member Functions
pdf1d_builder Class Reference

Base for classes to build pdf1d_pdf objects. More...

#include <pdf1d_builder.h>

Inheritance diagram for pdf1d_builder:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 pdf1d_builder ()
 Dflt ctor.
virtual ~pdf1d_builder ()
 Destructor.
virtual pdf1d_pdfnew_model () const =0
 Create empty model.
virtual vcl_string new_model_type () const =0
 Name of the model class returned by new_model().
virtual void set_min_var (double min_var)=0
 Define lower threshold on variance for built models.
virtual double min_var () const =0
 Get lower threshold on variance for built models.
virtual void build (pdf1d_pdf &model, double mean) const =0
 Build default model with given mean.
virtual void build (pdf1d_pdf &model, mbl_data_wrapper< double > &data) const =0
 Build model from data.
virtual void build_from_array (pdf1d_pdf &model, const double *data, int n) const
 Build model from data.
virtual void weighted_build (pdf1d_pdf &model, mbl_data_wrapper< double > &data, const vcl_vector< double > &wts) const =0
 Build model from weighted data.
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_builderclone () const =0
 Create a copy on the heap and return base class pointer.
virtual void print_summary (vcl_ostream &os) const =0
 Print class to os.
virtual void b_write (vsl_b_ostream &bfs) const =0
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)=0
 Load class from binary file stream.

Detailed Description

Base for classes to build pdf1d_pdf objects.

Design Notes:

Models are passed to builder, rather than being created by builder, for efficiency when used in mixture models. (During building they'd have to be recreated at every iteration, which is expensive).

Definition at line 29 of file pdf1d_builder.h.


Constructor & Destructor Documentation

pdf1d_builder::pdf1d_builder ( )

Dflt ctor.

Definition at line 15 of file pdf1d_builder.cxx.

pdf1d_builder::~pdf1d_builder ( ) [virtual]

Destructor.

Definition at line 21 of file pdf1d_builder.cxx.


Member Function Documentation

virtual void pdf1d_builder::b_read ( vsl_b_istream bfs) [pure virtual]
virtual void pdf1d_builder::b_write ( vsl_b_ostream bfs) const [pure virtual]
virtual void pdf1d_builder::build ( pdf1d_pdf model,
double  mean 
) const [pure virtual]
virtual void pdf1d_builder::build ( pdf1d_pdf model,
mbl_data_wrapper< double > &  data 
) const [pure virtual]
void pdf1d_builder::build_from_array ( pdf1d_pdf model,
const double *  data,
int  n 
) const [virtual]

Build model from data.

Default wraps up data and calls build(model,wrapper);

Reimplemented in pdf1d_kernel_pdf_builder, pdf1d_exponential_builder, pdf1d_flat_builder, and pdf1d_gaussian_builder.

Definition at line 26 of file pdf1d_builder.cxx.

virtual pdf1d_builder* pdf1d_builder::clone ( ) const [pure virtual]
vcl_string pdf1d_builder::is_a ( ) const [virtual]
bool pdf1d_builder::is_class ( vcl_string const &  s) const [virtual]
virtual double pdf1d_builder::min_var ( ) const [pure virtual]

Get lower threshold on variance for built models.

Implemented in pdf1d_mixture_builder, pdf1d_kernel_pdf_builder, pdf1d_exponential_builder, pdf1d_flat_builder, and pdf1d_gaussian_builder.

virtual pdf1d_pdf* pdf1d_builder::new_model ( ) const [pure virtual]
virtual vcl_string pdf1d_builder::new_model_type ( ) const [pure virtual]
virtual void pdf1d_builder::print_summary ( vcl_ostream &  os) const [pure virtual]
virtual void pdf1d_builder::set_min_var ( double  min_var) [pure virtual]

Define lower threshold on variance for built models.

Implemented in pdf1d_mixture_builder, pdf1d_kernel_pdf_builder, pdf1d_exponential_builder, pdf1d_flat_builder, and pdf1d_gaussian_builder.

short pdf1d_builder::version_no ( ) const
virtual void pdf1d_builder::weighted_build ( pdf1d_pdf model,
mbl_data_wrapper< double > &  data,
const vcl_vector< double > &  wts 
) const [pure virtual]

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