Class to build vpdfl_axis_gaussian objects. More...
#include <vpdfl_axis_gaussian_builder.h>
Public Member Functions | |
vpdfl_axis_gaussian_builder () | |
Dflt ctor. | |
virtual | ~vpdfl_axis_gaussian_builder () |
Destructor. | |
virtual vpdfl_pdf_base * | new_model () const |
Create empty model. | |
virtual void | set_min_var (double min_var) |
Define lower threshold on variance for built models. | |
virtual double | min_var () const |
Get lower threshold on variance for built models. | |
virtual void | build (vpdfl_pdf_base &model, const vnl_vector< double > &mean) const |
Build default model with given mean. | |
virtual void | build (vpdfl_pdf_base &model, mbl_data_wrapper< vnl_vector< double > > &data) const |
Build model from data. | |
virtual void | weighted_build (vpdfl_pdf_base &model, mbl_data_wrapper< vnl_vector< double > > &data, const vcl_vector< double > &wts) const |
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 vpdfl_builder_base * | clone () 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 void | config_from_stream (vcl_istream &is) |
Read initialisation settings from a stream. | |
Static Public Member Functions | |
static vcl_auto_ptr < vpdfl_builder_base > | new_builder_from_stream (vcl_istream &is) |
Create a vpdfl_builder_base object given a config stream. | |
static vcl_auto_ptr < vpdfl_builder_base > | new_pdf_builder_from_stream (vcl_istream &) |
Create a vpdfl_builder_base object given a config stream (recursive style). | |
Private Member Functions | |
vpdfl_axis_gaussian & | gaussian (vpdfl_pdf_base &model) const |
Private Attributes | |
double | min_var_ |
Class to build vpdfl_axis_gaussian objects.
Definition at line 21 of file vpdfl_axis_gaussian_builder.h.
vpdfl_axis_gaussian_builder::vpdfl_axis_gaussian_builder | ( | ) |
Dflt ctor.
Definition at line 27 of file vpdfl_axis_gaussian_builder.cxx.
vpdfl_axis_gaussian_builder::~vpdfl_axis_gaussian_builder | ( | ) | [virtual] |
Destructor.
Definition at line 36 of file vpdfl_axis_gaussian_builder.cxx.
void vpdfl_axis_gaussian_builder::b_read | ( | vsl_b_istream & | bfs | ) | [virtual] |
Load class from binary file stream.
Implements vpdfl_builder_base.
Definition at line 263 of file vpdfl_axis_gaussian_builder.cxx.
void vpdfl_axis_gaussian_builder::b_write | ( | vsl_b_ostream & | bfs | ) | const [virtual] |
Save class to binary file stream.
Implements vpdfl_builder_base.
Definition at line 253 of file vpdfl_axis_gaussian_builder.cxx.
void vpdfl_axis_gaussian_builder::build | ( | vpdfl_pdf_base & | model, |
const vnl_vector< double > & | mean | ||
) | const [virtual] |
Build default model with given mean.
Implements vpdfl_builder_base.
Definition at line 68 of file vpdfl_axis_gaussian_builder.cxx.
void vpdfl_axis_gaussian_builder::build | ( | vpdfl_pdf_base & | model, |
mbl_data_wrapper< vnl_vector< double > > & | data | ||
) | const [virtual] |
Build model from data.
Implements vpdfl_builder_base.
Definition at line 80 of file vpdfl_axis_gaussian_builder.cxx.
vpdfl_builder_base * vpdfl_axis_gaussian_builder::clone | ( | ) | const [virtual] |
Create a copy on the heap and return base class pointer.
Implements vpdfl_builder_base.
Definition at line 235 of file vpdfl_axis_gaussian_builder.cxx.
void vpdfl_axis_gaussian_builder::config_from_stream | ( | vcl_istream & | is | ) | [virtual] |
Read initialisation settings from a stream.
Parameters:
{ min_var: 1.0e-6 }
mbl_exception_parse_error | if the parse fails. |
Reimplemented from vpdfl_builder_base.
Definition at line 290 of file vpdfl_axis_gaussian_builder.cxx.
vpdfl_axis_gaussian & vpdfl_axis_gaussian_builder::gaussian | ( | vpdfl_pdf_base & | model | ) | const [private] |
Definition at line 42 of file vpdfl_axis_gaussian_builder.cxx.
vcl_string vpdfl_axis_gaussian_builder::is_a | ( | ) | const [virtual] |
Name of the class.
Reimplemented from vpdfl_builder_base.
Definition at line 208 of file vpdfl_axis_gaussian_builder.cxx.
bool vpdfl_axis_gaussian_builder::is_class | ( | vcl_string const & | s | ) | const [virtual] |
Does the name of the class match the argument?.
Reimplemented from vpdfl_builder_base.
Definition at line 217 of file vpdfl_axis_gaussian_builder.cxx.
double vpdfl_axis_gaussian_builder::min_var | ( | ) | const [virtual] |
Get lower threshold on variance for built models.
Implements vpdfl_builder_base.
Definition at line 63 of file vpdfl_axis_gaussian_builder.cxx.
vcl_auto_ptr< vpdfl_builder_base > vpdfl_builder_base::new_builder_from_stream | ( | vcl_istream & | is | ) | [static, inherited] |
Create a vpdfl_builder_base object given a config stream.
mbl_exception | if parse error. |
vcl_runtime_exception | if parse error. |
This will store the constructed builder.
Incoming properties.
Definition at line 55 of file vpdfl_builder_base.cxx.
vpdfl_pdf_base * vpdfl_axis_gaussian_builder::new_model | ( | ) | const [virtual] |
Create empty model.
Implements vpdfl_builder_base.
Definition at line 49 of file vpdfl_axis_gaussian_builder.cxx.
vcl_auto_ptr< vpdfl_builder_base > vpdfl_builder_base::new_pdf_builder_from_stream | ( | vcl_istream & | is | ) | [static, inherited] |
Create a vpdfl_builder_base object given a config stream (recursive style).
Creates object, then uses config_from_stream(is) to set up internals
vcl_runtime_exception | if parse error. |
Creates object, then uses config_from_stream(is) to set up internals
Definition at line 145 of file vpdfl_builder_base.cxx.
void vpdfl_axis_gaussian_builder::print_summary | ( | vcl_ostream & | os | ) | const [virtual] |
Print class to os.
Implements vpdfl_builder_base.
Definition at line 244 of file vpdfl_axis_gaussian_builder.cxx.
void vpdfl_axis_gaussian_builder::set_min_var | ( | double | min_var | ) | [virtual] |
Define lower threshold on variance for built models.
Implements vpdfl_builder_base.
Definition at line 56 of file vpdfl_axis_gaussian_builder.cxx.
short vpdfl_axis_gaussian_builder::version_no | ( | ) | const |
Version number for I/O.
Reimplemented from vpdfl_builder_base.
Definition at line 226 of file vpdfl_axis_gaussian_builder.cxx.
void vpdfl_axis_gaussian_builder::weighted_build | ( | vpdfl_pdf_base & | model, |
mbl_data_wrapper< vnl_vector< double > > & | data, | ||
const vcl_vector< double > & | wts | ||
) | const [virtual] |
Build model from weighted data.
Implements vpdfl_builder_base.
Definition at line 136 of file vpdfl_axis_gaussian_builder.cxx.
double vpdfl_axis_gaussian_builder::min_var_ [private] |
Definition at line 23 of file vpdfl_axis_gaussian_builder.h.