KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
kjb::mcmcda::Data< Element > Class Template Reference

A class that holds data for the tracking problem. More...

#include <mcmcda_data.h>

Inheritance diagram for kjb::mcmcda::Data< Element >:

Public Types

typedef boost::function1
< Vector, const Element & > 
Convert
 
typedef Parent::iterator iterator
 
typedef Parent::const_iterator const_iterator
 

Public Member Functions

 Data ()
 Empty constructor. More...
 
template<class Iterator >
 Data (Iterator first, Iterator last)
 Constructor from sequence. More...
 
void read (const std::vector< std::string > &filenames)
 Reads data from files with given names. More...
 
void write (const std::vector< std::string > &filenames) const
 Write data to files with given names. More...
 
virtual E_set read_single_time (const std::string &) const
 Read data elements from a single time-step, contained in a single file. More...
 
virtual void write_single_time (const E_set &, const std::string &) const
 Read data elements from a single time-step, contained in a single file. More...
 
bool is_completely_empty () const
 Checks whether this data set is completely empty. More...
 
std::set< const Element * > neighborhood (const Element &y, int t, int d, int d_bar, double v_bar, double sg, const Convert &to_vector) const
 Computes the neighborhood of a point. See MCMCDA paper for details. More...
 
int neighborhood_size (const Element &y, int t, int d, int d_bar, double v_bar, double sg, const Convert &to_vector) const
 Computes the size of the neighborhood of a point. This should be faster than computing the neighborhood itself and getting its size(). More...
 
template<>
std::set< Vectorread_single_time (const std::string &filename) const
 
template<>
void write_single_time (const E_set &data_t, const std::string &filename) const
 

Detailed Description

template<class Element>
class kjb::mcmcda::Data< Element >

A class that holds data for the tracking problem.

It is a std::vector of sets of the association type. Each set represents the points at a given time, where the index gives the time step. In other words, if D is of type Data, D[t] is the data points found at time t.

Member Typedef Documentation

template<class Element>
typedef Parent::const_iterator kjb::mcmcda::Data< Element >::const_iterator
template<class Element>
typedef boost::function1<Vector, const Element&> kjb::mcmcda::Data< Element >::Convert
template<class Element>
typedef Parent::iterator kjb::mcmcda::Data< Element >::iterator

Constructor & Destructor Documentation

template<class Element>
kjb::mcmcda::Data< Element >::Data ( )
inline

Empty constructor.

template<class Element>
template<class Iterator >
kjb::mcmcda::Data< Element >::Data ( Iterator  first,
Iterator  last 
)
inline

Constructor from sequence.

Copies the track set from iterator sequence

Member Function Documentation

template<class Element>
bool kjb::mcmcda::Data< Element >::is_completely_empty ( ) const
inline

Checks whether this data set is completely empty.

template<class Element>
std::set< const Element * > kjb::mcmcda::Data< Element >::neighborhood ( const Element &  y,
int  t,
int  d,
int  d_bar,
double  v_bar,
double  sg,
const Convert to_vector 
) const

Computes the neighborhood of a point. See MCMCDA paper for details.

template<class Element>
int kjb::mcmcda::Data< Element >::neighborhood_size ( const Element &  y,
int  t,
int  d,
int  d_bar,
double  v_bar,
double  sg,
const Convert to_vector 
) const

Computes the size of the neighborhood of a point. This should be faster than computing the neighborhood itself and getting its size().

template<class Element>
void kjb::mcmcda::Data< Element >::read ( const std::vector< std::string > &  filenames)
inline

Reads data from files with given names.

template<class Element>
virtual E_set kjb::mcmcda::Data< Element >::read_single_time ( const std::string &  ) const
inlinevirtual

Read data elements from a single time-step, contained in a single file.

Reimplemented in kjb::pt::Box_data.

template<>
std::set< Vector > kjb::mcmcda::Data< Vector >::read_single_time ( const std::string &  filename) const
inline
template<class Element >
void kjb::mcmcda::Data< Element >::write ( const std::vector< std::string > &  filenames) const

Write data to files with given names.

template<class Element>
virtual void kjb::mcmcda::Data< Element >::write_single_time ( const E_set &  ,
const std::string &   
) const
inlinevirtual

Read data elements from a single time-step, contained in a single file.

Reimplemented in kjb::pt::Box_data.

template<>
void kjb::mcmcda::Data< Vector >::write_single_time ( const E_set &  data_t,
const std::string &  filename 
) const
inline

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