mbl_data_collector< T > Class Template Reference

#include <mbl_data_collector.h>

Inheritance diagram for mbl_data_collector< T >:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<class T>
class mbl_data_collector< T >

Templated base class for objects which collect sets of data.

They are primed with the total number of samples to be presented, then the record() function is called with each example. They can return a mbl_data_wrapper<T> object to iterate through the saved examples.

Definition at line 24 of file mbl_data_collector.h.


Public Member Functions

 mbl_data_collector ()
 Dflt ctor.
virtual ~mbl_data_collector ()
 Destructor.
virtual void clear ()=0
 Clear any stored data.
virtual void set_n_samples (int n)=0
 Hint about how many examples to expect.
virtual void record (const T &v)=0
 Record given object.
virtual mbl_data_wrapper< T > & data_wrapper ()=0
 Return object describing stored data.
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 mbl_data_collector_baseclone () 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.

Constructor & Destructor Documentation

template<class T>
mbl_data_collector< T >::mbl_data_collector (  )  [inline]

Dflt ctor.

Definition at line 17 of file mbl_data_collector.txx.

template<class T>
mbl_data_collector< T >::~mbl_data_collector (  )  [inline, virtual]

Destructor.

Definition at line 26 of file mbl_data_collector.txx.


Member Function Documentation

template<class T>
virtual void mbl_data_collector< T >::clear (  )  [pure virtual]

template<class T>
virtual void mbl_data_collector< T >::set_n_samples ( int  n  )  [pure virtual]

Hint about how many examples to expect.

Implemented in mbl_data_collector_list< T >, mbl_file_data_collector< T >, and mbl_stochastic_data_collector< T >.

template<class T>
virtual void mbl_data_collector< T >::record ( const T &  v  )  [pure virtual]

template<class T>
virtual mbl_data_wrapper<T >& mbl_data_collector< T >::data_wrapper (  )  [pure virtual]

Return object describing stored data.

Implemented in mbl_data_collector_list< T >, mbl_file_data_collector< T >, and mbl_stochastic_data_collector< T >.

vcl_string mbl_data_collector_base::is_a (  )  const [virtual, inherited]

bool mbl_data_collector_base::is_class ( vcl_string const &  s  )  const [virtual, inherited]

Does the name of the class match the argument?.

Reimplemented in mbl_data_collector_list< T >, mbl_file_data_collector< T >, and mbl_stochastic_data_collector< T >.

Definition at line 43 of file mbl_data_collector_base.cxx.

virtual mbl_data_collector_base* mbl_data_collector_base::clone (  )  const [pure virtual, inherited]

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

Implemented in mbl_data_collector_list< T >, mbl_file_data_collector< T >, and mbl_stochastic_data_collector< T >.

virtual void mbl_data_collector_base::print_summary ( vcl_ostream &  os  )  const [pure virtual, inherited]

virtual void mbl_data_collector_base::b_write ( vsl_b_ostream bfs  )  const [pure virtual, inherited]

Save class to binary file stream.

Implemented in mbl_data_collector_list< T >, mbl_file_data_collector< T >, and mbl_stochastic_data_collector< T >.

virtual void mbl_data_collector_base::b_read ( vsl_b_istream bfs  )  [pure virtual, inherited]

Load class from binary file stream.

Implemented in mbl_data_collector_list< T >, mbl_file_data_collector< T >, and mbl_stochastic_data_collector< T >.


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

Generated on Sun Nov 22 06:23:13 2009 for contrib/mul/mbl by  doxygen 1.5.5