Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

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  ) 
 

Dflt ctor.

Definition at line 17 of file mbl_data_collector.txx.

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

Destructor.

Definition at line 26 of file mbl_data_collector.txx.


Member Function Documentation

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 >.

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 >.

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

Clear any stored data.

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

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 >.

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]
 

Name of the class.

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

Definition at line 36 of file mbl_data_collector_base.cxx.

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 void mbl_data_collector_base::print_summary vcl_ostream &  os  )  const [pure virtual, inherited]
 

Print class to os.

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]
 

Record given object.

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 >::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 >.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:43:01 2008 for contrib/mul/mbl by  doxygen 1.4.4