Main MRPT website > C++ reference
MRPT logo
List of all members | Public Types | Public Member Functions
mrpt::dynamicsize_vector< T > Struct Template Reference

Detailed Description

template<typename T>
struct mrpt::dynamicsize_vector< T >

The base class of MRPT vectors, actually, Eigen column matrices of dynamic size with specialized constructors that resemble std::vector.

Note
For a summary and classification of all MRPT vector, array and matrix classes see: http://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes

Definition at line 94 of file base/include/mrpt/utils/types.h.

#include <mrpt/utils/types.h>

Inheritance diagram for mrpt::dynamicsize_vector< T >:
Inheritance graph
[legend]

Public Types

typedef Eigen::Matrix< T,
Eigen::Dynamic, 1 > 
Base
 
typedef dynamicsize_vector< T > mrpt_autotype
 

Public Member Functions

 dynamicsize_vector ()
 Default constructor: empty vector.
 
 dynamicsize_vector (size_t N)
 Constructor, initializes to a given initial size.
 
 dynamicsize_vector (size_t N, T init_val)
 Constructor, initializes to a given initial size, all elements to a given value.
 
template<typename R >
 dynamicsize_vector (const std::vector< R > &v)
 Constructor, initializes from a std::vector<> of scalars.
 
void resize (const size_t N, const T default_val)
 Overloaded resize method that mimics std::vector::resize(SIZE,DEFAULT_VALUE) instead of resize(nrows,ncols)
 
void resize (const size_t N)
 Normal resize of the vector (preserving old contents).
 
void clear ()
 Reset the vector to a 0-length.
 
void reserve (size_t dummy_size)
 DOES NOTHING (it's here for backward compatibility)
 

Member Typedef Documentation

template<typename T >
typedef Eigen::Matrix<T,Eigen::Dynamic,1> mrpt::dynamicsize_vector< T >::Base

Definition at line 96 of file base/include/mrpt/utils/types.h.

template<typename T >
typedef dynamicsize_vector<T> mrpt::dynamicsize_vector< T >::mrpt_autotype

Definition at line 97 of file base/include/mrpt/utils/types.h.

Constructor & Destructor Documentation

template<typename T >
mrpt::dynamicsize_vector< T >::dynamicsize_vector ( )
inline

Default constructor: empty vector.

Definition at line 101 of file base/include/mrpt/utils/types.h.

template<typename T >
mrpt::dynamicsize_vector< T >::dynamicsize_vector ( size_t  N)
inline

Constructor, initializes to a given initial size.

Definition at line 103 of file base/include/mrpt/utils/types.h.

template<typename T >
mrpt::dynamicsize_vector< T >::dynamicsize_vector ( size_t  N,
init_val 
)
inline

Constructor, initializes to a given initial size, all elements to a given value.

Definition at line 105 of file base/include/mrpt/utils/types.h.

template<typename T >
template<typename R >
mrpt::dynamicsize_vector< T >::dynamicsize_vector ( const std::vector< R > &  v)
inline

Constructor, initializes from a std::vector<> of scalars.

Definition at line 108 of file base/include/mrpt/utils/types.h.

Member Function Documentation

template<typename T >
void mrpt::dynamicsize_vector< T >::clear ( void  )
inline

Reset the vector to a 0-length.

Definition at line 114 of file base/include/mrpt/utils/types.h.

template<typename T >
void mrpt::dynamicsize_vector< T >::reserve ( size_t  dummy_size)
inline

DOES NOTHING (it's here for backward compatibility)

Definition at line 116 of file base/include/mrpt/utils/types.h.

template<typename T >
void mrpt::dynamicsize_vector< T >::resize ( const size_t  N,
const T  default_val 
)
inline

Overloaded resize method that mimics std::vector::resize(SIZE,DEFAULT_VALUE) instead of resize(nrows,ncols)

Note
This method exists for backward compatibility in MRPT

Definition at line 110 of file base/include/mrpt/utils/types.h.

Referenced by mrpt::math::TPoint2D::getAsVector(), mrpt::math::TPose2D::getAsVector(), mrpt::math::TPoint3D::getAsVector(), mrpt::math::TPose3D::getAsVector(), mrpt::math::TPose3DQuat::getAsVector(), and mrpt::bayes::detail::CRunOneKalmanIteration_addNewLandmarks::operator()().

template<typename T >
void mrpt::dynamicsize_vector< T >::resize ( const size_t  N)
inline

Normal resize of the vector (preserving old contents).

Definition at line 112 of file base/include/mrpt/utils/types.h.




Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013