ERC CISST - cisst software
vctDynamicConstVectorBase< _vectorOwnerType, _elementType >::ConstSubvector Class Reference
#include <vctDynamicConstVectorBase.h>
List of all members.
Detailed Description
template<class _vectorOwnerType, typename _elementType>
class vctDynamicConstVectorBase< _vectorOwnerType, _elementType >::ConstSubvector
Define a ConstSubvector class for compatibility with the fixed size vectors. A const subvector has the same stride as the parent container.
Example:
typedef vctDynamicVector<double> VectorType; VectorType v(9); VectorType::ConstSubvector::Type first4(v, 0, 4); VectorType::ConstSubvector::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:
vctFixedSizeConstVectorRef<double, 3 /( add stride here if necessary )/> firstThree(v, 0); vctFixedSizeConstVectorRef<double, 3 /( add stride here if necessary )/> lastThree(v, 6);
Definition at line 889 of file vctDynamicConstVectorBase.h.
Public Types
The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu