ERC CISST - cisst software

vctDynamicVectorBase< _vectorOwnerType, _elementType >::Subvector Class Reference

#include <vctDynamicVectorBase.h>

List of all members.


Detailed Description

template<class _vectorOwnerType, typename _elementType>
class vctDynamicVectorBase< _vectorOwnerType, _elementType >::Subvector

Define a Subvector class for compatibility with the fixed size vectors. A subvector has the same stride as the parent container.

Example:

typedef vctDynamicVector<double> VectorType; VectorType v(9); VectorType::Subvector::Type first4(v, 0, 4); VectorType::Subvector::Type last5(v, 4, 5);

Note:
There is no straightforward way to define a fixed-size subvector of a dynamic vector, because the stride of the dynamic vector is not known in compilation time. A way to do it is:
vctFixedSizeVectorRef<double, 3 /( add stride here if necessary )/> firstThree(v, 0); vctFixedSizeVectorRef<double, 3 /( add stride here if necessary )/> lastThree(v, 6);

Definition at line 1168 of file vctDynamicVectorBase.h.

Public Types


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu