Classes | Functions
contrib/mul/mbl/mbl_data_collector.h File Reference

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

#include <vcl_vector.h>
#include <mbl/mbl_data_collector_base.h>
#include <mbl/mbl_data_wrapper.h>

Go to the source code of this file.

Classes

class  mbl_data_collector< T >
 Templated base class for objects which collect sets of data. More...

Functions

template<class T >
unsigned long mbl_data_collector_copy_all (mbl_data_collector< T > &dest, mbl_data_wrapper< T > &src)
 Copy all the data from a mbl_data_wrapper<vnl_vector<double> > into a mbl_data_collector.
template<class T >
unsigned long mbl_data_collector_merge_all (mbl_data_collector< T > &dest, mbl_data_wrapper< T > &src0, mbl_data_wrapper< T > &src1, vcl_vector< unsigned > *order=0)
 Merge all the data from two mbl_data_wrapper-s into one mbl_data_collector.

Detailed Description

Templated base class for objects which collect sets of data.

Author:
Tim Cootes
Ian Scott

Definition in file mbl_data_collector.h.


Function Documentation

template<class T >
unsigned long mbl_data_collector_copy_all ( mbl_data_collector< T > &  dest,
mbl_data_wrapper< T > &  src 
)

Copy all the data from a mbl_data_wrapper<vnl_vector<double> > into a mbl_data_collector.

This function will change the position of the iterator in the mbl_data_wrapper<vnl_vector<double> >, but will not modify any of the data The function returns the number of objects copied.

Definition at line 33 of file mbl_data_collector.txx.

template<class T >
unsigned long mbl_data_collector_merge_all ( mbl_data_collector< T > &  dest,
mbl_data_wrapper< T > &  src0,
mbl_data_wrapper< T > &  src1,
vcl_vector< unsigned > *  order 
)

Merge all the data from two mbl_data_wrapper-s into one mbl_data_collector.

This function will change the position of the iterator in src0 and src1, but will not modify any of the data therein. Existing vectors in dest are preserved, as is the vector ordering within src0 and src1. The function returns the number of vectors copied.

Parameters:
src0The first input mbl_data_wrapper
src1The second input mbl_data_wrapper
destThe destination mbl_data_collector
orderIf specified, this vector will contain 0 in every position where a value from src0 has been copied into dest, and a 1 where a value from src1 has been copied into dest.

Definition at line 50 of file mbl_data_collector.txx.