Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
mfpf_sad_vec_cost_builder Class Reference

Builder for mfpf_sad_vec_cost objects. More...

#include <mfpf_sad_vec_cost_builder.h>

Inheritance diagram for mfpf_sad_vec_cost_builder:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mfpf_sad_vec_cost_builder ()
virtual ~mfpf_sad_vec_cost_builder ()
virtual mfpf_vec_costnew_cost () const
 Create new mfpf_sad_vec_cost on heap.
virtual void clear (unsigned n_egs)
 Initialise building.
virtual void add_example (const vnl_vector< double > &v)
 Add one example to the model.
virtual void build (mfpf_vec_cost &)
 Build object from the data supplied in add_example().
virtual bool set_from_stream (vcl_istream &is)
 Initialise from a string stream.
void set_impose_robust_min_mad (bool on)
 Set flag for robust min mad (based on training set).
virtual vcl_string is_a () const
 Name of the class.
virtual mfpf_vec_cost_builderclone () const
 Create a copy on the heap and return base class pointer.
virtual void print_summary (vcl_ostream &os) const
 Print class to os.
short version_no () const
 Version number for I/O.
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.

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.

Private Member Functions

void set_defaults ()
 Define default values.

Private Attributes

double min_mad_
 Minimum mean abs diff allowed.
vcl_vector< vnl_vector< double > > data_
 Space to record examples.
bool impose_robust_min_mad_
 If true recalculate min_mad_ based on median of training set.

Detailed Description

Builder for mfpf_sad_vec_cost objects.

Definition at line 14 of file mfpf_sad_vec_cost_builder.h.


Constructor & Destructor Documentation

mfpf_sad_vec_cost_builder::mfpf_sad_vec_cost_builder ( )

Definition at line 25 of file mfpf_sad_vec_cost_builder.cxx.

mfpf_sad_vec_cost_builder::~mfpf_sad_vec_cost_builder ( ) [virtual]

Definition at line 41 of file mfpf_sad_vec_cost_builder.cxx.


Member Function Documentation

void mfpf_sad_vec_cost_builder::add_example ( const vnl_vector< double > &  v) [virtual]

Add one example to the model.

Implements mfpf_vec_cost_builder.

Definition at line 60 of file mfpf_sad_vec_cost_builder.cxx.

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

Load class from binary file stream.

Implements mfpf_vec_cost_builder.

Definition at line 228 of file mfpf_sad_vec_cost_builder.cxx.

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

Save class to binary file stream.

Implements mfpf_vec_cost_builder.

Definition at line 217 of file mfpf_sad_vec_cost_builder.cxx.

void mfpf_sad_vec_cost_builder::build ( mfpf_vec_cost pf) [virtual]

Build object from the data supplied in add_example().

Build this object from the data supplied in add_example().

Implements mfpf_vec_cost_builder.

Definition at line 76 of file mfpf_sad_vec_cost_builder.cxx.

void mfpf_sad_vec_cost_builder::clear ( unsigned  n_egs) [virtual]

Initialise building.

Must be called before any calls to add_example(...)

Implements mfpf_vec_cost_builder.

Definition at line 54 of file mfpf_sad_vec_cost_builder.cxx.

mfpf_vec_cost_builder * mfpf_sad_vec_cost_builder::clone ( ) const [virtual]

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

Implements mfpf_vec_cost_builder.

Definition at line 196 of file mfpf_sad_vec_cost_builder.cxx.

vcl_auto_ptr< mfpf_vec_cost_builder > mfpf_vec_cost_builder::create_from_stream ( vcl_istream &  is) [static, inherited]

Create a concrete object, from a text specification.

Definition at line 51 of file mfpf_vec_cost_builder.cxx.

vcl_string mfpf_sad_vec_cost_builder::is_a ( ) const [virtual]

Name of the class.

Reimplemented from mfpf_vec_cost_builder.

Definition at line 190 of file mfpf_sad_vec_cost_builder.cxx.

mfpf_vec_cost * mfpf_sad_vec_cost_builder::new_cost ( ) const [virtual]

Create new mfpf_sad_vec_cost on heap.

Implements mfpf_vec_cost_builder.

Definition at line 46 of file mfpf_sad_vec_cost_builder.cxx.

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

Print class to os.

Implements mfpf_vec_cost_builder.

Definition at line 205 of file mfpf_sad_vec_cost_builder.cxx.

void mfpf_sad_vec_cost_builder::set_defaults ( ) [private]

Define default values.

Definition at line 31 of file mfpf_sad_vec_cost_builder.cxx.

bool mfpf_sad_vec_cost_builder::set_from_stream ( vcl_istream &  is) [virtual]

Initialise from a string stream.

Reimplemented from mfpf_vec_cost_builder.

Definition at line 153 of file mfpf_sad_vec_cost_builder.cxx.

void mfpf_sad_vec_cost_builder::set_impose_robust_min_mad ( bool  on) [inline]

Set flag for robust min mad (based on training set).

Definition at line 54 of file mfpf_sad_vec_cost_builder.h.

short mfpf_sad_vec_cost_builder::version_no ( ) const

Version number for I/O.

Reimplemented from mfpf_vec_cost_builder.

Definition at line 211 of file mfpf_sad_vec_cost_builder.cxx.


Member Data Documentation

vcl_vector<vnl_vector<double> > mfpf_sad_vec_cost_builder::data_ [private]

Space to record examples.

Definition at line 21 of file mfpf_sad_vec_cost_builder.h.

If true recalculate min_mad_ based on median of training set.

Definition at line 24 of file mfpf_sad_vec_cost_builder.h.

Minimum mean abs diff allowed.

Definition at line 18 of file mfpf_sad_vec_cost_builder.h.


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