Base for classes which build mfpf_vec_cost objects. More...
#include <mfpf_vec_cost_builder.h>
Public Member Functions | |
mfpf_vec_cost_builder () | |
Dflt ctor. | |
virtual | ~mfpf_vec_cost_builder () |
Destructor. | |
virtual mfpf_vec_cost * | new_cost () const =0 |
Create new vec_cost of appropriate type on heap. | |
virtual void | clear (unsigned n_egs)=0 |
Initialise building. | |
virtual void | add_example (const vnl_vector< double > &v)=0 |
Add one example to the model. | |
virtual void | build (mfpf_vec_cost &)=0 |
Build object from the data supplied in add_example(). | |
virtual bool | set_from_stream (vcl_istream &is) |
Initialise from a string stream. | |
short | version_no () const |
Version number for I/O. | |
virtual vcl_string | is_a () const |
Name of the class. | |
virtual mfpf_vec_cost_builder * | clone () 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. | |
Static Public Member Functions | |
static vcl_auto_ptr < mfpf_vec_cost_builder > | create_from_stream (vcl_istream &is) |
Create a concrete object, from a text specification. |
Base for classes which build mfpf_vec_cost objects.
Definition at line 16 of file mfpf_vec_cost_builder.h.
mfpf_vec_cost_builder::mfpf_vec_cost_builder | ( | ) |
Dflt ctor.
Definition at line 19 of file mfpf_vec_cost_builder.cxx.
mfpf_vec_cost_builder::~mfpf_vec_cost_builder | ( | ) | [virtual] |
Destructor.
Definition at line 27 of file mfpf_vec_cost_builder.cxx.
virtual void mfpf_vec_cost_builder::add_example | ( | const vnl_vector< double > & | v | ) | [pure virtual] |
Add one example to the model.
Implemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
virtual void mfpf_vec_cost_builder::b_read | ( | vsl_b_istream & | bfs | ) | [pure virtual] |
Load class from binary file stream.
Implemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
virtual void mfpf_vec_cost_builder::b_write | ( | vsl_b_ostream & | bfs | ) | const [pure virtual] |
Save class to binary file stream.
Implemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
virtual void mfpf_vec_cost_builder::build | ( | mfpf_vec_cost & | ) | [pure virtual] |
Build object from the data supplied in add_example().
Implemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
virtual void mfpf_vec_cost_builder::clear | ( | unsigned | n_egs | ) | [pure virtual] |
Initialise building.
Must be called before any calls to add_example(...)
Implemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
virtual mfpf_vec_cost_builder* mfpf_vec_cost_builder::clone | ( | ) | const [pure virtual] |
Create a copy on the heap and return base class pointer.
Implemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
vcl_auto_ptr< mfpf_vec_cost_builder > mfpf_vec_cost_builder::create_from_stream | ( | vcl_istream & | is | ) | [static] |
Create a concrete object, from a text specification.
Definition at line 51 of file mfpf_vec_cost_builder.cxx.
vcl_string mfpf_vec_cost_builder::is_a | ( | ) | const [virtual] |
Name of the class.
Reimplemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
Definition at line 81 of file mfpf_vec_cost_builder.cxx.
virtual mfpf_vec_cost* mfpf_vec_cost_builder::new_cost | ( | ) | const [pure virtual] |
Create new vec_cost of appropriate type on heap.
Implemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
virtual void mfpf_vec_cost_builder::print_summary | ( | vcl_ostream & | os | ) | const [pure virtual] |
Print class to os.
Implemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
bool mfpf_vec_cost_builder::set_from_stream | ( | vcl_istream & | is | ) | [virtual] |
Initialise from a string stream.
Reimplemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
Definition at line 33 of file mfpf_vec_cost_builder.cxx.
short mfpf_vec_cost_builder::version_no | ( | ) | const |
Version number for I/O.
Reimplemented in mfpf_sad_vec_cost_builder, and mfpf_ssd_vec_cost_builder.
Definition at line 72 of file mfpf_vec_cost_builder.cxx.