Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Friends
mrpt::dynamicsize_vector Struct Reference

Detailed Description

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

#include <mrpt/utils/types.h>

Inheritance diagram for mrpt::dynamicsize_vector:
Inheritance graph
[legend]

List of all members.

Public Types

typedef Eigen::Matrix< T,
Eigen::Dynamic, 1 > 
Base
 Base class typedef.
typedef dynamicsize_vector< T > mrpt_autotype
enum  
enum  
typedef Base::PlainObject PlainObject

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)
void swap (MatrixBase< OtherDerived > const &other)
Index innerStride () const
Index outerStride () const

Friends

struct internal::conservative_resize_like_impl

Member Typedef Documentation

Base class typedef.

See also:
PlainObjectBase

Reimplemented from Eigen::Matrix< T, Eigen::Dynamic, 1 >.

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

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

Definition at line 155 of file Core.


Member Enumeration Documentation

anonymous enum [inherited]

Definition at line 151 of file Core.

anonymous enum [inherited]

Definition at line 157 of file Core.


Constructor & Destructor Documentation

mrpt::dynamicsize_vector::dynamicsize_vector ( ) [inline]

Default constructor: empty vector.

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

mrpt::dynamicsize_vector::dynamicsize_vector ( size_t  N) [inline]

Constructor, initializes to a given initial size.

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

mrpt::dynamicsize_vector::dynamicsize_vector ( size_t  N,
init_val 
) [inline]

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

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

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

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

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


Member Function Documentation

void mrpt::dynamicsize_vector::clear ( void  ) [inline]

Reset the vector to a 0-length.

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

Index Eigen::Matrix::innerStride ( ) const [inline, inherited]

Definition at line 339 of file Core.

Index Eigen::Matrix::outerStride ( ) const [inline, inherited]

Definition at line 340 of file Core.

void mrpt::dynamicsize_vector::reserve ( size_t  dummy_size) [inline]

DOES NOTHING (it's here for backward compatibility)

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

void mrpt::dynamicsize_vector::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 109 of file base/include/mrpt/utils/types.h.

Referenced by mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getWeights(), mrpt::poses::CPoint< CPoint3D >::getAsVector(), mrpt::math::TPoint2D::getAsVector(), mrpt::math::TPose2D::getAsVector(), mrpt::math::TPoint3D::getAsVector(), mrpt::math::TPose3D::getAsVector(), and mrpt::math::TPose3DQuat::getAsVector().

void mrpt::dynamicsize_vector::resize ( const size_t  N) [inline]

Normal resize of the vector (preserving old contents).

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

void Eigen::Matrix::swap ( MatrixBase< OtherDerived > const &  other) [inline, inherited]

Definition at line 336 of file Core.


Friends And Related Function Documentation

friend struct internal::conservative_resize_like_impl [friend, inherited]

Definition at line 363 of file Core.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011