Public Member Functions
mbl_data_collector< T > Class Template Reference

Templated base class for objects which collect sets of data. More...

#include <mbl_data_collector.h>

Inheritance diagram for mbl_data_collector< T >:
Inheritance graph
[legend]

List of all members.

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.

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.


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_stochastic_data_collector< T >, mbl_file_data_collector< T >, and mbl_data_collector_list< 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_stochastic_data_collector< T >, mbl_file_data_collector< T >, and mbl_data_collector_list< T >.

template<class T>
virtual void mbl_data_collector< T >::clear ( ) [pure virtual]
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_stochastic_data_collector< T >, mbl_file_data_collector< T >, and mbl_data_collector_list< 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_stochastic_data_collector< T >, mbl_file_data_collector< T >, and mbl_data_collector_list< 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_stochastic_data_collector< T >, mbl_file_data_collector< T >, and mbl_data_collector_list< 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]
template<class T>
virtual void mbl_data_collector< T >::record ( const T &  v) [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_stochastic_data_collector< T >, mbl_file_data_collector< T >, and mbl_data_collector_list< T >.


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