cisst-saw
Loading...
Searching...
No Matches
vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > Class Template Reference

A template for a fixed length vector with fixed spacing in memory. More...

#include <vctFixedSizeConstVectorBase.h>

Inheritance diagram for vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >:
vctFixedSizeVectorBase< _size, 1, _elementType, typename VectorTraits::array > vctFixedSizeVectorBase< _size, _stride, _elementType, _dataPtrType > vctFixedSizeVector< value_type, DIMENSION > vctFixedSizeVector< value_type, 3 > vctFixedSizeVector< bool, _size > vctFixedSizeVector< value_type, _size > vctFixedSizeVector< double, 1 > vctFixedSizeVector< double, 2 > vctFixedSizeVector< double, 3 > vctFixedSizeVector< double, 4 > vctFixedSizeVector< double, 5 > vctFixedSizeVector< double, 6 > vctFixedSizeVector< double, 7 > vctFixedSizeVector< double, 8 > vctFixedSizeVector< double, 9 > vctFixedSizeVector< float, 1 > vctFixedSizeVector< float, 2 > vctFixedSizeVector< float, 3 > vctFixedSizeVector< float, 4 > vctFixedSizeVector< float, 5 > vctFixedSizeVector< float, 6 > vctFixedSizeVector< float, 7 > vctFixedSizeVector< float, 8 > vctFixedSizeVector< float, 9 > vctFixedSizeVector< long, 1 > vctFixedSizeVector< long, 2 > vctFixedSizeVector< long, 3 > vctFixedSizeVector< long, 4 > vctFixedSizeVector< long, 5 > vctFixedSizeVector< long, 6 > vctFixedSizeVector< long, 7 > vctFixedSizeVector< long, 8 > vctFixedSizeVector< long, 9 > vctFixedSizeVector< unsigned long, 1 > vctFixedSizeVector< unsigned long, 2 > vctFixedSizeVector< unsigned long, 3 > vctFixedSizeVector< unsigned long, 4 > vctFixedSizeVector< unsigned long, 5 > vctFixedSizeVector< unsigned long, 6 > vctFixedSizeVector< unsigned long, 7 > vctFixedSizeVector< unsigned long, 8 > vctFixedSizeVector< unsigned long, 9 > vctFixedSizeVector< int, 1 > vctFixedSizeVector< int, 2 > vctFixedSizeVector< int, 3 > vctFixedSizeVector< int, 4 > vctFixedSizeVector< int, 5 > vctFixedSizeVector< int, 6 > vctFixedSizeVector< int, 7 > vctFixedSizeVector< int, 8 > vctFixedSizeVector< int, 9 > vctFixedSizeVector< unsigned int, 1 > vctFixedSizeVector< unsigned int, 2 > vctFixedSizeVector< unsigned int, 3 > vctFixedSizeVector< unsigned int, 4 > vctFixedSizeVector< unsigned int, 5 > vctFixedSizeVector< unsigned int, 6 > vctFixedSizeVector< unsigned int, 7 > vctFixedSizeVector< unsigned int, 8 > vctFixedSizeVector< unsigned int, 9 > vctFixedSizeVector< short, 1 > vctFixedSizeVector< short, 2 > vctFixedSizeVector< short, 3 > vctFixedSizeVector< short, 4 > vctFixedSizeVector< short, 5 > vctFixedSizeVector< short, 6 > vctFixedSizeVector< short, 7 > vctFixedSizeVector< short, 8 > vctFixedSizeVector< short, 9 > vctFixedSizeVector< unsigned short, 1 > vctFixedSizeVector< unsigned short, 2 > vctFixedSizeVector< unsigned short, 3 > vctFixedSizeVector< unsigned short, 4 > vctFixedSizeVector< unsigned short, 5 > vctFixedSizeVector< unsigned short, 6 > vctFixedSizeVector< unsigned short, 7 > vctFixedSizeVector< unsigned short, 8 > vctFixedSizeVector< unsigned short, 9 > vctFixedSizeVector< char, 1 > vctFixedSizeVector< char, 2 > vctFixedSizeVector< char, 3 > vctFixedSizeVector< char, 4 > vctFixedSizeVector< char, 5 > vctFixedSizeVector< char, 6 > vctFixedSizeVector< char, 7 > vctFixedSizeVector< char, 8 > vctFixedSizeVector< char, 9 > vctFixedSizeVector< unsigned char, 1 > vctFixedSizeVector< unsigned char, 2 > vctFixedSizeVector< unsigned char, 3 > vctFixedSizeVector< unsigned char, 4 > vctFixedSizeVector< unsigned char, 5 > vctFixedSizeVector< unsigned char, 6 > vctFixedSizeVector< unsigned char, 7 > vctFixedSizeVector< unsigned char, 8 > vctFixedSizeVector< unsigned char, 9 > vctFixedSizeVector< bool, 1 > vctFixedSizeVector< bool, 2 > vctFixedSizeVector< bool, 3 > vctFixedSizeVector< bool, 4 > vctFixedSizeVector< bool, 5 > vctFixedSizeVector< bool, 6 > vctFixedSizeVector< bool, 7 > vctFixedSizeVector< bool, 8 > vctFixedSizeVector< bool, 9 > vctFixedSizeVector< value_type, SIZE > vctFixedSizeVector< CISSTNETLIB_INTEGER, MAX_SIZE_1 > vctFixedSizeVector< CISSTNETLIB_DOUBLE, LWORK > vctFixedSizeVector< CISSTNETLIB_INTEGER, LIWORK > vctFixedSizeVector< CISSTNETLIB_DOUBLE, _n > vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma+_me > vctFixedSizeVector< size_type, 2 > vctFixedSizeVector< CISSTNETLIB_INTEGER, MIN_MN > vctFixedSizeVector< CISSTNETLIB_DOUBLE, MIN_MN >

Public Types

enum  { SIZE = VectorTraits::SIZE }
enum  { STRIDE = VectorTraits::STRIDE }
typedef vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > ThisType
typedef vctFixedSizeVectorTraits< _elementType, _size, _stride > VectorTraits
typedef VectorTraits::iterator iterator
typedef VectorTraits::const_iterator const_iterator
typedef VectorTraits::reverse_iterator reverse_iterator
typedef VectorTraits::const_reverse_iterator const_reverse_iterator
typedef vctFixedSizeConstMatrixRef< _elementType, 1, _size, _stride *_size, _stride > RowConstMatrixRefType
typedef vctFixedSizeMatrixRef< _elementType, 1, _size, _stride *_size, _stride > RowMatrixRefType
typedef vctFixedSizeConstMatrixRef< _elementType, _size, 1, _stride, _stride *_size > ColConstMatrixRefType
typedef vctFixedSizeMatrixRef< _elementType, _size, 1, _stride, _stride *_size > ColMatrixRefType
typedef vctFixedSizeVector< _elementType, _size > VectorValueType
typedef vctFixedSizeVector< _elementType, _size > CopyType
typedef vctFixedSizeVector< bool, _size > BoolVectorValueType

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
const_iterator begin (void) const
const_iterator end (void) const
const_reverse_iterator rbegin (void) const
const_reverse_iterator rend (void) const
size_type size (void) const
size_type max_size (void) const
difference_type stride (void) const
bool empty (void) const
const_reference operator[] (size_type index) const
const_reference at (size_type index) const CISST_THROW(std
const_reference operator() (size_type index) const CISST_THROW(std
const_reference Element (size_type index) const
const_pointer Pointer (size_type index=0) const
bool ValidIndex (size_type index) const
Size dependant methods.

The following methods are size dependant, i.e. don't necessarily mean anything for all sizes of vector. For example, using the Z() method on a vector of size 2 shouldn't be allowed. It would have been possible to check these errors at compilation time, but this would require an overhead of code and therefore execution time which is not worth it. Therefore, we are using and CMN_ASSERT() to check that the template parameter _size is valid

Note
Using CMN_ASSERT on a template parameter still allows the compiler to perform some optimization, which would be harder if CMN_ASSERT was testing a method paramater.
const value_typeX (void) const
const value_typeY (void) const
const value_typeZ (void) const
const value_typeW (void) const
vctFixedSizeConstVectorRef< _elementType, 2, _stride > XY (void) const
vctFixedSizeConstVectorRef< _elementType, 2, 2 *_stride > XZ (void) const
vctFixedSizeConstVectorRef< _elementType, 2, 3 *_stride > XW (void) const
vctFixedSizeConstVectorRef< _elementType, 2, _stride > YZ (void) const
vctFixedSizeConstVectorRef< _elementType, 2, 2 *_stride > YW (void) const
vctFixedSizeConstVectorRef< _elementType, 2, _stride > ZW (void) const
vctFixedSizeConstVectorRef< _elementType, 3, _stride > XYZ (void) const
vctFixedSizeConstVectorRef< _elementType, 3, _stride > YZW (void) const
vctFixedSizeConstVectorRef< _elementType, 4, _stride > XYZW (void) const
RowConstMatrixRefType AsRowMatrix (void) const
ColConstMatrixRefType AsColMatrix (void) const
template<vct::size_type __subSize>
vctFixedSizeConstVectorRef< _elementType, __subSize, _stride > Ref (const size_type startPosition=0) const CISST_THROW(std
Incremental operations returning a scalar.

Compute a scalar from all the elements of the vector.

value_type SumOfElements (void) const
value_type ProductOfElements (void) const
value_type NormSquare (void) const
NormType Norm (void) const
bool IsNormalized (_elementType tolerance=cmnTypeTraits< _elementType >::Tolerance()) const
value_type L1Norm (void) const
value_type LinfNorm (void) const
value_type MaxElement (void) const
value_type MinElement (void) const
value_type MaxAbsElement (void) const
value_type MinAbsElement (void) const
void MinAndMaxElement (value_type &minElement, value_type &maxElement) const
bool IsPositive (void) const
bool IsNonNegative (void) const
bool IsNonPositive (void) const
bool IsNegative (void) const
bool All (void) const
bool Any (void) const
bool IsFinite (void) const
bool HasNaN (void) const
Storage format.
bool IsCompact (void) const
bool IsFortran (void) const
template<size_type __size, stride_type __stride, class __dataPtrType>
bool FastCopyCompatible (const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > &source) const
template<class __vectorOwnerType>
bool FastCopyCompatible (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &source) const
template<stride_type __stride, class __dataPtrType>
value_type DotProduct (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
Elementwise comparisons between vectors.

Returns the vector of comparison's results.

template<stride_type __stride, class __dataPtrType>
bool Equal (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
bool operator== (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
bool AlmostEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector, value_type tolerance) const
template<stride_type __stride, class __dataPtrType>
bool AlmostEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
bool NotEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
bool operator!= (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
bool Lesser (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
bool LesserOrEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
bool Greater (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
bool GreaterOrEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType ElementwiseEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType ElementwiseNotEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType ElementwiseLesser (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType ElementwiseLesserOrEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType ElementwiseGreater (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType ElementwiseGreaterOrEqual (const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
Elementwise comparisons between a vector and a scalar.

Returns the vector of comparison's results.

bool Equal (const value_type &scalar) const
bool operator== (const value_type &scalar) const
bool NotEqual (const value_type &scalar) const
bool operator!= (const value_type &scalar) const
bool Lesser (const value_type &scalar) const
bool LesserOrEqual (const value_type &scalar) const
bool Greater (const value_type &scalar) const
bool GreaterOrEqual (const value_type &scalar) const
BoolVectorValueType ElementwiseEqual (const value_type &scalar) const
BoolVectorValueType ElementwiseNotEqual (const value_type &scalar) const
BoolVectorValueType ElementwiseLesser (const value_type &scalar) const
BoolVectorValueType ElementwiseLesserOrEqual (const value_type &scalar) const
BoolVectorValueType ElementwiseGreater (const value_type &scalar) const
BoolVectorValueType ElementwiseGreaterOrEqual (const value_type &scalar) const
Unary elementwise operations.

Returns the result of vector.op().

VectorValueType Abs (void) const
VectorValueType Negation (void) const
VectorValueType Floor (void) const
VectorValueType Ceil (void) const
VectorValueType Normalized(void) const CISST_THROW(std void ToStream (std::ostream &outputStream) const
void ToStreamRaw (std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const
void SerializeRaw (std::ostream &outputStream) const

Protected Member Functions

void ThrowUnlessValidIndex (size_type index) const CISST_THROW(std

Protected Attributes

_dataPtrType Data

Detailed Description

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
class vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >

A template for a fixed length vector with fixed spacing in memory.

The vector can be defined over an existing memory block, or define its own memory block. The class's methods follow the STL specifications for Random Access Container. It uses vctFixedSizeVectorTraits to define the types required by the STL interface.

This class defines a read-only memory vector. The read/write vector is derived from this class (compare with vctFixedStrideVectorConstIterator). Therefore, all the methods of this class are const. The non-const vector and methods are defined in vctFixedSizeVectorBase.

Vector indexing is zero-based.

The method provided for the compatibility with the STL containers start with a lower case. Other methods start with a capitalilized letter (see CISST naming convention).

Parameters
_elementTypethe type of element in the vector.
_sizethe number of elements that the vector provides access to.
_stridethe spacing between the elements in the memory block. _stride=1 means that the elements are next to each other. _stride=2 means they are separated by one, and so on.
_dataPtrTypethe type of object that defines the vector. This may be an element pointer of an acutal fixed-size C-style array type.
See also
vctFixedStrideVectorConstIterator vctFixedSizeVectorTraits

Member Typedef Documentation

◆ BoolVectorValueType

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeVector<bool, _size> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::BoolVectorValueType

The type of a vector of booleans returned from operations on this object, e.g., ElementwiseEqual.

◆ ColConstMatrixRefType

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeConstMatrixRef<_elementType, _size, 1, _stride, _stride*_size> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ColConstMatrixRefType

type of overlay column matrix over this sequence

◆ ColMatrixRefType

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeMatrixRef<_elementType, _size, 1, _stride, _stride*_size> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ColMatrixRefType

◆ const_iterator

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef VectorTraits::const_iterator vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::const_iterator

Const iterator on the elements of the vector.

◆ const_reverse_iterator

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef VectorTraits::const_reverse_iterator vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::const_reverse_iterator

Const reverse iterator on the elements of the vector.

◆ CopyType

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeVector<_elementType, _size> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::CopyType

The type used to create a copy.

◆ iterator

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef VectorTraits::iterator vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::iterator

Iterator on the elements of the vector.

◆ reverse_iterator

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef VectorTraits::reverse_iterator vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::reverse_iterator

Reverse iterator on the elements of the vector.

◆ RowConstMatrixRefType

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeConstMatrixRef<_elementType, 1, _size, _stride*_size,_stride> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::RowConstMatrixRefType

type of overlay row matrix over this sequence

◆ RowMatrixRefType

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeMatrixRef<_elementType, 1, _size, _stride*_size, _stride> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::RowMatrixRefType

◆ ThisType

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeConstVectorBase<_size, _stride, _elementType, _dataPtrType> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ThisType

Type of the vector itself.

◆ VectorTraits

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeVectorTraits<_elementType, _size, _stride> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::VectorTraits

Traits used for all useful types related to a vctFixedSizeVector.

◆ VectorValueType

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
typedef vctFixedSizeVector<_elementType, _size> vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::VectorValueType

The type of a vector returned by value from operations on this object

Member Enumeration Documentation

◆ anonymous enum

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
anonymous enum
Enumerator
STRIDE 

◆ anonymous enum

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
anonymous enum
Enumerator
SIZE 

Member Function Documentation

◆ Abs()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::VectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Abs ( void ) const
inline

Unary elementwise operations on a vector. For each element of the vector "this", performs \( this[i] \leftarrow op(otherVector[i])\) where \(op\) can calculate the absolute value (Abs), the opposite (Negation) or the normalized version (Normalized).

Returns
A new vector.

◆ All()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::All ( void ) const
inline

Return true if all the elements of this vector are nonzero, false otherwise

◆ AlmostEqual() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::AlmostEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ AlmostEqual() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::AlmostEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector,
value_type tolerance ) const
inline

◆ Any()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Any ( void ) const
inline

Return true if any element of this vector is nonzero, false otherwise

◆ AsColMatrix()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
ColConstMatrixRefType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::AsColMatrix ( void ) const
inline

◆ AsRowMatrix()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
RowConstMatrixRefType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::AsRowMatrix ( void ) const
inline

Create an overlay matrix (MatrixRef) on top of this vector and return it.

◆ at()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_reference vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::at ( size_type index) const
inline

Access an element by index (const). Compare with std::vector::at(). This method can be a handy substitute for the overloaded operator [] when operator overloading is unavailable or inconvenient.

Returns
a const reference to element[index]

◆ begin()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_iterator vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::begin ( void ) const
inline

Returns a const iterator on the first element (STL compatibility).

◆ Ceil()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::VectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Ceil ( void ) const
inline

◆ DotProduct()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::DotProduct ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

Dot product with another vector of the same type and size

Parameters
otherVectorsecond operand of the dot product ("this" is the first operand)
Returns
The dot product of this and otherVector.

◆ Element()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_reference vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Element ( size_type index) const
inline

Access an element by index (const). This method allows to access an element without any bounds checking.

Returns
a reference to the element at index

◆ ElementwiseEqual() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseEqual ( const value_type & scalar) const
inline

Comparison between a vector and a scalar, containing the same type of elements. The comparaison ( \( = \neq < \leq > \geq \)) for ElementwiseEqual(), ElementwiseNotEqual(), ElementwiseLesser(), ElementwiseLesserOrEqual(), ElementwiseGreater() or ElementwiseGreaterOrEqual() is performed elementwise between the vector and the scalar and stored in a newly created vector. There is no operator provided since the semantic would be ambiguous.

Returns
A vector of booleans.

◆ ElementwiseEqual() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

Comparison between two vectors of the same size, containing the same type of elements. The strides and the internal representation (_dataPtrType) can be different. The comparaison ( \( = \neq < \leq > \geq \)) for ElementwiseEqual(), ElementwiseNotEqual(), ElementwiseLesser(), ElementwiseLesserOrEqual(), ElementwiseGreater() or ElementwiseGreaterOrEqual() is performed elementwise between the two vectors and stored in a newly created vector. There is no operator provided since the semantic would be ambiguous.

Returns
A vector of booleans.

◆ ElementwiseGreater() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseGreater ( const value_type & scalar) const
inline

◆ ElementwiseGreater() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseGreater ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ ElementwiseGreaterOrEqual() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseGreaterOrEqual ( const value_type & scalar) const
inline

◆ ElementwiseGreaterOrEqual() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseGreaterOrEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ ElementwiseLesser() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseLesser ( const value_type & scalar) const
inline

◆ ElementwiseLesser() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseLesser ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ ElementwiseLesserOrEqual() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseLesserOrEqual ( const value_type & scalar) const
inline

◆ ElementwiseLesserOrEqual() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseLesserOrEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ ElementwiseNotEqual() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseNotEqual ( const value_type & scalar) const
inline

◆ ElementwiseNotEqual() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
BoolVectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ElementwiseNotEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ empty()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::empty ( void ) const
inline

Tell is the vector is empty (STL compatibility). False unless SIZE is zero.

◆ end()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_iterator vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::end ( void ) const
inline

Returns a const iterator on the last element (STL compatibility).

◆ Equal() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Equal ( const value_type & scalar) const
inline

Comparison between a vector and a scalar. The type of the elements of the vector and the scalar must be the same. The comparaison ( \( = \neq < \leq > \geq \)) for Equal(), NotEqual(), Lesser(), LesserOrEqual(), Greater() or GreaterOrEqual() is performed elementwise between the vector and the scalar. A logical "and" is performed (except for NotEqual which uses a logical "or") to accumulate the elementwise results.. The only operators provided are "==" and "!=" since the semantic is not ambiguous.

Returns
A boolean.

◆ Equal() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Equal ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

Comparison between two vectors of the same size, containing the same type of elements. The stride and the internal representation (_dataPtrType) can be different. The comparaison ( \( = \neq < \leq > \geq \)) for Equal(), NotEqual(), Lesser(), LesserOrEqual(), Greater() or GreaterOrEqual() is performed elementwise between the two vectors. A logical "and" is performed (except for NotEqual which uses a logical "or") to accumulate the elementwise results. The only operators provided are "==" and "!=" since the semantic is not ambiguous.

Returns
A boolean.

◆ FastCopyCompatible() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<class __vectorOwnerType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::FastCopyCompatible ( const vctDynamicConstVectorBase< __vectorOwnerType, value_type > & source) const
inline

Test if the method FastCopyOf can be used instead of Assign. See FastCopyOf for more details.

◆ FastCopyCompatible() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<size_type __size, stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::FastCopyCompatible ( const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > & source) const
inline

Test if the method FastCopyOf can be used instead of Assign. See FastCopyOf for more details.

◆ Floor()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::VectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Floor ( void ) const
inline

◆ Greater() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Greater ( const value_type & scalar) const
inline

◆ Greater() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Greater ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ GreaterOrEqual() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::GreaterOrEqual ( const value_type & scalar) const
inline

◆ GreaterOrEqual() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::GreaterOrEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ HasNaN()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::HasNaN ( void ) const
inline

Return true if any element of this vector is NaN, false otherwise

◆ IsCompact()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::IsCompact ( void ) const
inline

Test if the vector is compact, i.e. a vector of length l actually uses a contiguous block of memory or size l. A compact vector has a stride equal to 1.

◆ IsFinite()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::IsFinite ( void ) const
inline

Return true if all the elements of this vector are finite, false otherwise

◆ IsFortran()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::IsFortran ( void ) const
inline

Test if the vector is "Fortran" compatible, i.e. is compact.

See also
IsCompact

◆ IsNegative()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::IsNegative ( void ) const
inline

Return true if all the elements of this vector are strictly negative, false otherwise

◆ IsNonNegative()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::IsNonNegative ( void ) const
inline

Return true if all the elements of this vector are non-negative, false otherwise

◆ IsNonPositive()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::IsNonPositive ( void ) const
inline

Return true if all the elements of this vector are non-positive, false otherwise

◆ IsNormalized()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::IsNormalized ( _elementType tolerance = cmnTypeTraits<_elementType>::Tolerance()) const
inline

Test if this vector is normalized.

Parameters
toleranceThe maximum difference between the norm and 1 to consider the vector normalized.

◆ IsPositive()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::IsPositive ( void ) const
inline

Return true if all the elements of this vector are strictly positive, false otherwise

◆ L1Norm()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::L1Norm ( void ) const
inline

Return the L1 norm of the vector, i.e. the sum of the absolute values of all the elements.

Returns
The L1 norm.

◆ Lesser() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Lesser ( const value_type & scalar) const
inline

◆ Lesser() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Lesser ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ LesserOrEqual() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::LesserOrEqual ( const value_type & scalar) const
inline

◆ LesserOrEqual() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::LesserOrEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ LinfNorm()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::LinfNorm ( void ) const
inline

Return the Linf norm of the vector, i.e. the maximum of the absolute values of all the elements.

See also
MaxAbsElement.
Returns
The Linf norm.

◆ max_size()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
size_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::max_size ( void ) const
inline

Returns the maximum size of the vector (STL compatibility). For a fixed size vector, same as the size().

◆ MaxAbsElement()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::MaxAbsElement ( void ) const
inline

Return the maximum of the absolute values of all the elements.

See also
LinfNorm.
Returns
The maximum of the absolute values.

◆ MaxElement()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::MaxElement ( void ) const
inline

Return the maximum element of the vector.

Returns
The maximum element

◆ MinAbsElement()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::MinAbsElement ( void ) const
inline

Return the minimum of the absolute values of all the elements.

Returns
The minimum of the absolute values.

◆ MinAndMaxElement()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
void vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::MinAndMaxElement ( value_type & minElement,
value_type & maxElement ) const
inline

Compute the minimum AND maximum elements of the vector. This method is more runtime-efficient than computing them separately.

Parameters
minElementreference to store the minimum element result.
maxElementreference to store the maximum element result.

◆ MinElement()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::MinElement ( void ) const
inline

Return the minimum element of the vector.

Returns
The minimum element

◆ Negation()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::VectorValueType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Negation ( void ) const
inline

◆ Norm()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
NormType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Norm ( void ) const
inline

Return the norm of the vector.

Returns
The norm.

◆ NormSquare()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::NormSquare ( void ) const
inline

Return the square of the norm of the vector.

Returns
The square of the norm

◆ NotEqual() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::NotEqual ( const value_type & scalar) const
inline

◆ NotEqual() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::NotEqual ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ operator!=() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::operator!= ( const value_type & scalar) const
inline

◆ operator!=() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::operator!= ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ operator()()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_reference vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::operator() ( size_type index) const
inline

Access an element by index (const). See method at().

Returns
a const reference to element[index]

◆ operator==() [1/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::operator== ( const value_type & scalar) const
inline

◆ operator==() [2/2]

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<stride_type __stride, class __dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::operator== ( const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > & otherVector) const
inline

◆ operator[]()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_reference vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::operator[] ( size_type index) const
inline

Access an element by index (const).

Returns
a const reference to the element[index]

◆ Pointer()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_pointer vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Pointer ( size_type index = 0) const
inline

Returns a const pointer to an element of the container, specified by its index. Addition to the STL requirements.

◆ ProductOfElements()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ProductOfElements ( void ) const
inline

Return the product of the elements of the vector.

Returns
The product of all the elements

◆ rbegin()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_reverse_iterator vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::rbegin ( void ) const
inline

Returns a reverse const iterator on the last element (STL compatibility).

◆ Ref()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
template<vct::size_type __subSize>
vctFixedSizeConstVectorRef< _elementType, __subSize, _stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Ref ( const size_type startPosition = 0) const
inline

Create a const reference to a sub vector

◆ rend()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const_reverse_iterator vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::rend ( void ) const
inline

Returns a reverse const iterator on the element before first (STL compatibility).

◆ SerializeRaw()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
void vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::SerializeRaw ( std::ostream & outputStream) const
inline

Binary serialization

◆ size()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
size_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::size ( void ) const
inline

Returns the size of the vector (STL compatibility).

◆ stride()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
difference_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::stride ( void ) const
inline

Not required by STL but provided for completeness

◆ SumOfElements()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
value_type vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::SumOfElements ( void ) const
inline

Return the sum of the elements of the vector.

Returns
The sum of all the elements

◆ ThrowUnlessValidIndex()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
void vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ThrowUnlessValidIndex ( size_type index) const
inlineprotected

Check the validity of an index.

◆ ToStream()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
VectorValueType Normalized(void) const CISST_THROW(std void vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ToStream ( std::ostream & outputStream) const
inline

``Syntactic sugar'' to simplify the creation of a reference to a subvector. This class declares a const subvector type. To declare a subvector object, here's an example.

typedef vctFixedSizeVector<double, 9> Vector9; Vector9 v; Vector9::ConstSubvector<3>::Type first3(v, 0); // first 3 elements of v Vector9::ConstSubvector<3>::Type mid3(v, 0); // middle 3 elements of v Vector9::ConstSubvector<3>::Type last3(v, 6); // last 3 elements of v

Parameters
_subSizethe size of the subvector
Note
the stride of the subvector with respect to its parent container is always 1. That is, the memory strides of the subvector and the parent container are equal. For more sophisticated subsequences, the user has to write customized code. */ template <size_type _subSize> class ConstSubvector { public: typedef vctFixedSizeConstVectorRef<value_type, _subSize, STRIDE> Type; };

std::string ToString(void) const { std::stringstream outputStream; ToStream(outputStream); return outputStream.str(); }

/*! Print the matrix in a human readable format

◆ ToStreamRaw()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
void vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ToStreamRaw ( std::ostream & outputStream,
const char delimiter = ' ',
bool headerOnly = false,
const std::string & headerPrefix = "" ) const
inline

Print data only with optional separator

◆ ValidIndex()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
bool vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ValidIndex ( size_type index) const
inline

Returns true if this index is valid.

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType )

◆ W()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const value_type & vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::W ( void ) const
inline

Returns the fourth element of the vector. This method uses CMN_ASSERT to check that the size is at least 4.

◆ X()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const value_type & vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::X ( void ) const
inline

Returns the first element of the vector. This method uses CMN_ASSERT to check that the size is at least 1.

◆ XW()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 2, 3 *_stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::XW ( void ) const
inline

Return a (const) vector reference for the first and fourth elements of this vector.

◆ XY()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 2, _stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::XY ( void ) const
inline

Return a (const) vector reference for the first two elements of this vector. May be used when switching from homogeneous coordinates to normal

◆ XYZ()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 3, _stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::XYZ ( void ) const
inline

Return a (const) vector reference for the first three elements of this vector. May be used when switching from homogeneous coordinates to normal, or when refering to a subvector of a row or a column inside a small matrix.

◆ XYZW()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 4, _stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::XYZW ( void ) const
inline

Return a (const) vector reference for the first four elements of this vector. May be used when switching from homogeneous coordinates to normal, or when refering to a subvector of a row or a column inside a small matrix.

◆ XZ()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 2, 2 *_stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::XZ ( void ) const
inline

Return a (const) vector reference for the first and third elements of this vector.

◆ Y()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const value_type & vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Y ( void ) const
inline

Returns the second element of the vector. This method uses CMN_ASSERT to check that the size is at least 2.

◆ YW()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 2, 2 *_stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::YW ( void ) const
inline

Return a (const) vector reference for the two elements of this vector beginning on the second.

◆ YZ()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 2, _stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::YZ ( void ) const
inline

Return a (const) vector reference for the two elements of this vector beginning on the second.

◆ YZW()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 3, _stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::YZW ( void ) const
inline

Return a (const) vector reference for the second, third and fourth elements of this vector.

◆ Z()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
const value_type & vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Z ( void ) const
inline

Returns the third element of the vector. This method uses CMN_ASSERT to check that the size is at least 3.

◆ ZW()

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
vctFixedSizeConstVectorRef< _elementType, 2, _stride > vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::ZW ( void ) const
inline

Return a (const) vector reference for the two elements of this vector beginning on the third.

Member Data Documentation

◆ Data

template<vct::size_type _size, vct::stride_type _stride, class _elementType, class _dataPtrType>
_dataPtrType vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Data
protected

A declaration of the vector-defining member object


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