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

Represents a trajectory. Vector of optionals to trajectory elements. More...

#include <tracking_trajectory.h>

Inheritance diagram for kjb::tracking::Generic_trajectory< T >:

Public Types

typedef
Generic_trajectory_element< T > 
Trajectory_element
 
typedef std::vector
< boost::optional
< Trajectory_element > > 
Base
 

Public Member Functions

 Generic_trajectory ()
 
 Generic_trajectory (size_t size)
 
 Generic_trajectory (double h, double w, double g)
 
 Generic_trajectory (size_t sz, double h, double w, double g)
 
template<class F >
Canonical_trajectory to_canonical (F to_vector) const
 
size_t parse (std::ifstream &ifs)
 Reads a single trajectory from the given file. More...
 
void write (const std::string &filename) const
 Writes a single trajectory to a file. More...
 
bool parse_header (const std::string &)
 Parses the header information from a header line. More...
 
void write_header (std::ofstream &) const
 Writes the header of a trajectory. Does nothing by default. Please specialize. More...
 
int start_time () const
 Returns index of first valid element. More...
 
int end_time () const
 Returns index of last valid element. More...
 
std::vector< T > get_values () const
 Get a vector of the values of this trajectory. More...
 
template<class OutIt , class Trans >
void transform (OutIt outp, Trans f) const
 Fill a sequence of values obtained from this trajectory. More...
 

Public Attributes

Entity_id id
 
double height
 
double width
 
double girth
 

Friends

void swap (Generic_trajectory< T > &t1, Generic_trajectory< T > &t2)
 Swap two trajectories. More...
 

Detailed Description

template<class T>
class kjb::tracking::Generic_trajectory< T >

Represents a trajectory. Vector of optionals to trajectory elements.

Member Typedef Documentation

template<class T>
typedef std::vector<boost::optional<Trajectory_element> > kjb::tracking::Generic_trajectory< T >::Base

Constructor & Destructor Documentation

template<class T>
kjb::tracking::Generic_trajectory< T >::Generic_trajectory ( )
inline
template<class T>
kjb::tracking::Generic_trajectory< T >::Generic_trajectory ( size_t  size)
inline
template<class T>
kjb::tracking::Generic_trajectory< T >::Generic_trajectory ( double  h,
double  w,
double  g 
)
inline
template<class T>
kjb::tracking::Generic_trajectory< T >::Generic_trajectory ( size_t  sz,
double  h,
double  w,
double  g 
)
inline

Member Function Documentation

template<class T >
int kjb::tracking::Generic_trajectory< T >::end_time ( ) const

Returns index of last valid element.

template<class T>
std::vector<T> kjb::tracking::Generic_trajectory< T >::get_values ( ) const
inline

Get a vector of the values of this trajectory.

template<class T >
size_t kjb::tracking::Generic_trajectory< T >::parse ( std::ifstream &  ifs)

Reads a single trajectory from the given file.

template<class T>
bool kjb::tracking::Generic_trajectory< T >::parse_header ( const std::string &  )
inline

Parses the header information from a header line.

template<class T >
int kjb::tracking::Generic_trajectory< T >::start_time ( ) const

Returns index of first valid element.

template<class T >
template<class F >
Canonical_trajectory kjb::tracking::Generic_trajectory< T >::to_canonical ( to_vector) const
template<class T >
template<class OutIt , class Trans >
void kjb::tracking::Generic_trajectory< T >::transform ( OutIt  outp,
Trans  f 
) const

Fill a sequence of values obtained from this trajectory.

template<class T >
void kjb::tracking::Generic_trajectory< T >::write ( const std::string &  filename) const

Writes a single trajectory to a file.

template<class T>
void kjb::tracking::Generic_trajectory< T >::write_header ( std::ofstream &  ) const
inline

Writes the header of a trajectory. Does nothing by default. Please specialize.

Friends And Related Function Documentation

template<class T>
void swap ( Generic_trajectory< T > &  t1,
Generic_trajectory< T > &  t2 
)
friend

Swap two trajectories.

Member Data Documentation

template<class T>
double kjb::tracking::Generic_trajectory< T >::girth
template<class T>
double kjb::tracking::Generic_trajectory< T >::height
template<class T>
Entity_id kjb::tracking::Generic_trajectory< T >::id
template<class T>
double kjb::tracking::Generic_trajectory< T >::width

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