cisst-saw
Loading...
Searching...
No Matches
vctDynamicVectorBase< _vectorOwnerType, _elementType > Class Template Reference

#include <vctDynamicVectorBase.h>

Inheritance diagram for vctDynamicVectorBase< _vectorOwnerType, _elementType >:
vctDynamicConstVectorBase< _vectorOwnerType, _elementType > vctDynamicVectorRef< value_type >

Classes

class  Subvector

Public Types

typedef vctDynamicVectorBase ThisType
typedef vctDynamicConstVectorBase< _vectorOwnerType, _elementType > BaseType
typedef _vectorOwnerType VectorOwnerType
typedef BaseType::iterator iterator
typedef BaseType::reverse_iterator reverse_iterator
typedef BaseType::const_iterator const_iterator
typedef BaseType::const_reverse_iterator const_reverse_iterator
typedef BaseType::CopyType CopyType
typedef BaseType::VectorValueType VectorValueType
typedef class cmnTypeTraits< value_typeTypeTraits
typedef TypeTraits::VaArgPromotion ElementVaArgPromotion

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
iterator begin (void)
iterator end (void)
reverse_iterator rbegin (void)
reverse_iterator rend (void)
const_iterator begin (void) const
const_iterator end (void) const
const_reverse_iterator rbegin (void) const
const_reverse_iterator rend (void) const
reference operator[] (index_type index)
const_reference operator[] (index_type index) const
const VectorOwnerTypeOwner (void) const
VectorOwnerTypeOwner (void)
pointer Pointer (index_type index=0)
const_pointer Pointer (index_type index=0) const
reference at (index_type index) CISST_THROW(std
const_reference at (index_type index) const CISST_THROW(std
reference operator() (index_type index) CISST_THROW(std
const_reference operator() (index_type index) const CISST_THROW(std
reference Element (index_type index)
const_reference Element (index_type index) const
value_type SetAll (const value_type value)
bool Zeros (void)
template<class __vectorOwnerType>
ThisTypeAssign (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &other)
template<class __vectorOwnerType>
ThisTypeAssign (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &other, size_type length, size_type startPositionThis=0, size_type startPositionOther=0)
Assignment operation between vectors of different types.
Parameters
otherThe vector to be copied.
template<class __vectorOwnerType, typename __elementType>
ThisTypeAssign (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other)
template<class __vectorOwnerType, typename __elementType>
ThisTypeoperator= (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other)
template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType>
ThisTypeAssign (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other)
Forced assignment operation between vectors of

different types. This method will use SetSize on the destination vector (this vector) to make sure the assignment will work. It is important to note that if the sizes don't match, memory for this vector will be re-allocated. If the program has previously created some references (as in vctDynamic{Const}VectorRef) on this vector, they will become invalid.

Note
For a non-reallocating Assign, it is recommended to use the Assign() methods.
This method is provided for both fixed size and dynamic vectors for API consistency (usable in templated code). There is obviously not resize involved on fixed size vectors.
If the destination vector doesn't have the same size as the source and can not be resized, an exception will be thrown by the Assign method called internally.
Parameters
otherThe vector to be copied.
template<class __vectorOwnerType, typename __elementType>
ThisTypeForceAssign (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other)
template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType>
ThisTypeForceAssign (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other)
template<class __vectorOwnerType>
bool FastCopyOf (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &source, bool performSafetyChecks=true) CISST_THROW(std
template<size_type __size, stride_type __stride, class __dataPtrType>
bool FastCopyOf (const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > &source, bool performSafetyChecks=true) CISST_THROW(std
ThisTypeAssign (const value_type *elements)
ThisTypeAssign (value_type element0, value_type element1,...) CISST_THROW(std
template<class __vectorOwnerType, class __elementType>
ThisTypeConcatenationOf (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &otherVector, __elementType lastElement)
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. Therefore, we are using CMN_ASSERT to check that the size is valid

value_typeX (void)
const value_typeX (void) const
value_typeY (void)
const value_typeY (void) const
value_typeZ (void)
const value_typeZ (void) const
value_typeW (void)
const value_typeW (void) const
vctDynamicVectorRef< _elementType > XY (void)
vctDynamicVectorRef< _elementType > XZ (void)
vctDynamicVectorRef< _elementType > XW (void)
vctDynamicVectorRef< _elementType > YZ (void)
vctDynamicVectorRef< _elementType > YW (void)
vctDynamicVectorRef< _elementType > ZW (void)
vctDynamicConstVectorRef< _elementType > XY (void) const
vctDynamicConstVectorRef< _elementType > XZ (void) const
vctDynamicConstVectorRef< _elementType > XW (void) const
vctDynamicConstVectorRef< _elementType > YZ (void) const
vctDynamicConstVectorRef< _elementType > YW (void) const
vctDynamicConstVectorRef< _elementType > ZW (void) const
vctDynamicVectorRef< _elementType > XYZ (void)
vctDynamicVectorRef< _elementType > YZW (void)
vctDynamicConstVectorRef< _elementType > XYZ (void) const
vctDynamicConstVectorRef< _elementType > YZW (void) const
vctDynamicVectorRef< _elementType > XYZW (void)
vctDynamicConstVectorRef< _elementType > XYZW (void) const
vctDynamicVectorRef< _elementType > Ref (const size_type size, const size_type startPosition=0) CISST_THROW(std
vctDynamicConstVectorRef< _elementType > Ref (const size_type size, const size_type startPosition=0) const CISST_THROW(std
template<class __inputVectorOwner, class __indexVectorOwner>
void SelectFrom (const vctDynamicConstVectorBase< __inputVectorOwner, _elementType > &input, const vctDynamicConstVectorBase< __indexVectorOwner, index_type > &index)
template<class __vectorOwnerType1, class __vectorOwnerType2>
void CrossProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &inputVector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &inputVector2)
Binary elementwise operations between two vectors.

Operate on both elements and store values in both.

template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisTypeSumOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisTypeDifferenceOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisTypeElementwiseProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisTypeElementwiseRatioOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisTypeElementwiseMinOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisTypeElementwiseMaxOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisTypeElementwiseClippedInOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &boundVector, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector)
template<class __vectorOwnerType>
ThisTypeAdd (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeSubtract (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeElementwiseMultiply (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeElementwiseDivide (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeElementwiseMin (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeElementwiseMax (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeElementwiseClipAbove (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &upperBoundVector)
template<class __vectorOwnerType>
ThisTypeElementwiseClipBelow (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &lowerBoundVector)
template<class __vectorOwnerType>
ThisTypeElementwiseClipIn (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &boundVector)
template<class __vectorOwnerType>
ThisTypeoperator+= (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeoperator-= (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeSwapElementsWith (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector)
Binary elementwise operations a vector and a scalar.

Store the result of op(vector, scalar) to a third vector.

template<class __vectorOwnerType>
ThisTypeSumOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar)
template<class __vectorOwnerType>
ThisTypeDifferenceOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar)
template<class __vectorOwnerType>
ThisTypeProductOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar)
template<class __vectorOwnerType>
ThisTypeRatioOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar)
template<class __vectorOwnerType>
ThisTypeClippedAboveOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type upperBound)
template<class __vectorOwnerType>
ThisTypeClippedBelowOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type lowerBound)
template<class __vectorOwnerType>
ThisTypeClippedInOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type bound)
Binary elementwise operations a scalar and a vector.

Store the result of op(scalar, vector) to a third vector.

template<class __vectorOwnerType>
ThisTypeSumOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
template<class __vectorOwnerType>
ThisTypeDifferenceOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
template<class __vectorOwnerType>
ThisTypeProductOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
template<class __vectorOwnerType>
ThisTypeRatioOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
template<class __vectorOwnerType>
ThisTypeClippedAboveOf (const value_type upperBound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
template<class __vectorOwnerType>
ThisTypeClippedBelowOf (const value_type lowerBound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
template<class __vectorOwnerType>
ThisTypeClippedInOf (const value_type bound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
Binary elementwise operations between a vector and a scalar.

Store the result of op(this, scalar) back to this vector.

ThisTypeAdd (const value_type scalar)
ThisTypeSubtract (const value_type scalar)
ThisTypeMultiply (const value_type scalar)
ThisTypeDivide (const value_type scalar)
ThisTypeClipAbove (const value_type upperBound)
ThisTypeClipBelow (const value_type lowerBound)
ThisTypeClipIn (const value_type bound)
ThisTypeoperator+= (const value_type scalar)
ThisTypeoperator-= (const value_type scalar)
ThisTypeoperator*= (const value_type scalar)
ThisTypeoperator/= (const value_type scalar)
template<class __vectorOwnerType>
ThisTypeAddProductOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisTypeAddElementwiseProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
Binary elementwise operations between a vector and a

matrix. Store the result of op() to a third vector (this vector).

template<class __matrixOwnerType, class __vectorOwnerType>
ThisTypeProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &inputVector)
template<class __vectorOwnerType, class __matrixOwnerType>
ThisTypeProductOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &inputVector, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix)
Unary elementwise operations.

Store the result of op(vector) to another vector.

template<class __vectorOwnerType>
ThisTypeAbsOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeNegationOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeFloorOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeCeilOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
ThisTypeNormalizedOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) CISST_THROW(std
Store back unary elementwise operations.

Store the result of op(this) to this vector.

ThisTypeAbsSelf (void)
ThisTypeNegationSelf (void)
ThisTypeFloorSelf (void)
ThisTypeCeilSelf (void)
ThisTypeNormalizedSelf (void) CISST_THROW(std

Friends

class vctDynamicVectorLoopEngines

Detailed Description

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

This class provides all the const methods inherited from vctConstVectorBase, and extends them with non-const methods, such as SumOf.

See also
vctDynamicConstVectorBase

Member Typedef Documentation

◆ BaseType

template<class _vectorOwnerType, typename _elementType>
typedef vctDynamicConstVectorBase<_vectorOwnerType, _elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::BaseType

Type of the base class.

◆ const_iterator

template<class _vectorOwnerType, typename _elementType>
typedef BaseType::const_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::const_iterator

◆ const_reverse_iterator

template<class _vectorOwnerType, typename _elementType>
typedef BaseType::const_reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::const_reverse_iterator

◆ CopyType

template<class _vectorOwnerType, typename _elementType>
typedef BaseType::CopyType vctDynamicVectorBase< _vectorOwnerType, _elementType >::CopyType

◆ ElementVaArgPromotion

template<class _vectorOwnerType, typename _elementType>
typedef TypeTraits::VaArgPromotion vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementVaArgPromotion

◆ iterator

template<class _vectorOwnerType, typename _elementType>
typedef BaseType::iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::iterator

◆ reverse_iterator

template<class _vectorOwnerType, typename _elementType>
typedef BaseType::reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::reverse_iterator

◆ ThisType

template<class _vectorOwnerType, typename _elementType>
typedef vctDynamicVectorBase vctDynamicVectorBase< _vectorOwnerType, _elementType >::ThisType

◆ TypeTraits

template<class _vectorOwnerType, typename _elementType>
typedef class cmnTypeTraits< value_type > vctDynamicVectorBase< _vectorOwnerType, _elementType >::TypeTraits

Type traits for the elements of the vector.

◆ VectorOwnerType

template<class _vectorOwnerType, typename _elementType>
typedef _vectorOwnerType vctDynamicVectorBase< _vectorOwnerType, _elementType >::VectorOwnerType

◆ VectorValueType

template<class _vectorOwnerType, typename _elementType>
typedef BaseType::VectorValueType vctDynamicVectorBase< _vectorOwnerType, _elementType >::VectorValueType

Member Function Documentation

◆ AbsOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::AbsOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
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 (AbsOf), the opposite (NegationOf) or the normalized version (NormalizedOf).

Parameters
otherVectorThe operand of the unary operation.
Returns
The vector "this" modified.

◆ AbsSelf()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::AbsSelf ( void )
inline

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

Returns
The vector "this" modified.

◆ Add() [1/2]

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Add ( const value_type scalar)
inline

Store back binary elementwise operations between a vector and a scalar. For each element of the vector "this", performs \(this[i] \leftarrow op(this[i], scalar)\) where \(op\) is either an addition (Add), a subtraction (Subtract), a multiplication (Multiply), a division (Divide), a minimum (ClipAbove) or a maximum (ClipBelow).

Parameters
scalarThe second operand of the binary operation (this[i] is the first operand.
Returns
The vector "this" modified.

◆ Add() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Add ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

Store back binary elementwise operations between two vectors. For each element of the vectors, performs \(this[i] \leftarrow op(this[i], otherVector[i])\) where \(op\) is either an addition (Add), a subtraction (Subtraction), a multiplication (ElementwiseMultiply) a division (ElementwiseDivide), a minimization (ElementwiseMin) or a maximisation (ElementwiseMax).

Parameters
otherVectorThe second operand of the binary operation (this[i] is the first operand)
Returns
The vector "this" modified.

◆ AddElementwiseProductOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::AddElementwiseProductOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & vector1,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & vector2 )
inline

◆ AddProductOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::AddProductOf ( const value_type scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector )
inline

◆ Assign() [1/6]

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Assign ( const value_type * elements)
inline

Assign to this vector values from a C array given as a pointer to value_type. The purpose of this method is to simplify the syntax by not necessitating the creation of an explicit vector for the given array. However, we only provide this method for an array of value_type. For arrays of other types a vector still needs to be declared.

This method assumes that the input array has the necessary number of elements.

Returns
a reference to this object.

◆ Assign() [2/6]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType, typename __elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Assign ( const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > & other)
inline

◆ Assign() [3/6]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Assign ( const vctDynamicConstVectorBase< __vectorOwnerType, value_type > & other)
inline

Assignment operation between vectors containing the same data type but different owners

Parameters
otherThe vector to be copied.

◆ Assign() [4/6]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Assign ( const vctDynamicConstVectorBase< __vectorOwnerType, value_type > & other,
size_type length,
size_type startPositionThis = 0,
size_type startPositionOther = 0 )
inline

Assignment operation between vectors containing the same data type but different owners and sizes. The number of elements to be copied must be lower or equal to the vector's size.

Parameters
otherThe vector to be copied.

◆ Assign() [5/6]

template<class _vectorOwnerType, typename _elementType>
template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Assign ( const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > & other)
inline

◆ Assign() [6/6]

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Assign ( value_type element0,
value_type element1,
... )
inline

Assign to this vector using stdarg macros and variable number of arguments. This operation assumes that all the arguments are of type value_type, and that their number is equal to the size of the vector. The user may need to explicitly cast the parameters to value_type to avoid runtime bugs and errors. We have not checked if stdarg macros can use reference types (probably not), so unlike the other constructors, this constructor takes all arguments by value.

Note
This method does not assert that the size is correct, as there is no way to know how many arguments were passed.

◆ at() [1/2]

template<class _vectorOwnerType, typename _elementType>
reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::at ( index_type index)
inline

Access an element by index (non-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 non-const reference to element[index]

◆ at() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::at ( index_type index) const
inline

◆ begin() [1/2]

template<class _vectorOwnerType, typename _elementType>
iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::begin ( void )
inline

Returns an iterator on the first element (STL compatibility).

◆ begin() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::begin ( void ) const
inline

◆ CeilOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::CeilOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ CeilSelf()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::CeilSelf ( void )
inline

◆ ClipAbove()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClipAbove ( const value_type upperBound)
inline

◆ ClipBelow()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClipBelow ( const value_type lowerBound)
inline

◆ ClipIn()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClipIn ( const value_type bound)
inline

◆ ClippedAboveOf() [1/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedAboveOf ( const value_type upperBound,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector )
inline

◆ ClippedAboveOf() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedAboveOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector,
const value_type upperBound )
inline

◆ ClippedBelowOf() [1/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedBelowOf ( const value_type lowerBound,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector )
inline

◆ ClippedBelowOf() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedBelowOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector,
const value_type lowerBound )
inline

◆ ClippedInOf() [1/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedInOf ( const value_type bound,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector )
inline

◆ ClippedInOf() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedInOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector,
const value_type bound )
inline

◆ ConcatenationOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType, class __elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ConcatenationOf ( const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > & otherVector,
__elementType lastElement )
inline

Concatenate a single element at the end of a shorter-by-1 vector to obtain a vector of my size. The concatenation result is stored in this vector. The function is useful, e.g., when embedding vectors from R^n into R^{n+1} or into homogeneous space.

◆ CrossProductOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
void vctDynamicVectorBase< _vectorOwnerType, _elementType >::CrossProductOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & inputVector1,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & inputVector2 )
inline

Cross Product of two vectors. This method uses CMN_ASSERT to check that the size of the vector is 3, and can only be performed on arguments vectors of size 3.

◆ DifferenceOf() [1/3]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::DifferenceOf ( const value_type scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector )
inline

◆ DifferenceOf() [2/3]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::DifferenceOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector,
const value_type scalar )
inline

◆ DifferenceOf() [3/3]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::DifferenceOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & vector1,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & vector2 )
inline

◆ Divide()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Divide ( const value_type scalar)
inline

◆ Element() [1/2]

template<class _vectorOwnerType, typename _elementType>
reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::Element ( index_type index)
inline

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

Returns
a reference to the element at index

◆ Element() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::Element ( index_type index) const
inline

◆ ElementwiseClipAbove()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseClipAbove ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & upperBoundVector)
inline

◆ ElementwiseClipBelow()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseClipBelow ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & lowerBoundVector)
inline

◆ ElementwiseClipIn()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseClipIn ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & boundVector)
inline

◆ ElementwiseClippedInOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseClippedInOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & boundVector,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & vector )
inline

◆ ElementwiseDivide()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseDivide ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ ElementwiseMax()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseMax ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ ElementwiseMaxOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseMaxOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & vector1,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & vector2 )
inline

◆ ElementwiseMin()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseMin ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ ElementwiseMinOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseMinOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & vector1,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & vector2 )
inline

◆ ElementwiseMultiply()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseMultiply ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ ElementwiseProductOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseProductOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & vector1,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & vector2 )
inline

◆ ElementwiseRatioOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseRatioOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & vector1,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & vector2 )
inline

◆ end() [1/2]

template<class _vectorOwnerType, typename _elementType>
iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::end ( void )
inline

Returns an iterator on the last element (STL compatibility).

◆ end() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::end ( void ) const
inline

◆ FastCopyOf() [1/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
bool vctDynamicVectorBase< _vectorOwnerType, _elementType >::FastCopyOf ( const vctDynamicConstVectorBase< __vectorOwnerType, value_type > & source,
bool performSafetyChecks = true )
inline

Fast copy. This method uses memcpy whenever it is possible to perform a fast copy from another vector to this vector.

  • The method will first verify that the source and destination have the same size and throws an exception otherwise (std::runtime_error). See cmnThrow for details.
  • If any of the two vectors is not compact, this method will return false. If both vectors are compact, a memcpy is performed and the method returns true.
  • To avoid the tests above, one can set the parameter performSafetyChecks to false. This should be used only when the programmer knows for sure that the source and destination are compatible (size and compactness).
  • As opposed to Assign, this method doesn't perform any type conversion.
  • Since no constructor is called for the contained elements, this function performs a "shallow copy". If the contained objects have a pointer as data member, the copied object will carry on the same pointer (hence pointing at the same memory block which could easily lead to bugs).

The basic and safe use of this method for a vector would be:

if (!destination.FastCopyOf(source)) {
destination.Assign(source);
}

If the method is to be called many times (in a loop for example), it is recommended to check that the source and destination are compatible once and then use the option to turn off the different safety checks for each FastCopyOf.

bool canUseFastCopy = destination.FastCopyCompatible(source);
for (index = 0; index < 1000; index++) {
DoSomethingUseful(source);
if (canUseFastCopy) {
destination.FastCopyOf(source, false); // Do not check again
} else {
destination.Assign(source);
}
}
size_t index_type
Definition vctContainerTraits.h:36
Parameters
sourceVector used to set the content of this vector.
performSafetyChecksFlag set to false to avoid safety checks, use with extreme caution.

◆ FastCopyOf() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<size_type __size, stride_type __stride, class __dataPtrType>
bool vctDynamicVectorBase< _vectorOwnerType, _elementType >::FastCopyOf ( const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > & source,
bool performSafetyChecks = true )
inline

◆ FloorOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::FloorOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ FloorSelf()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::FloorSelf ( void )
inline

◆ ForceAssign() [1/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType, typename __elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ForceAssign ( const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > & other)
inline

◆ ForceAssign() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ForceAssign ( const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > & other)
inline

◆ Multiply()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Multiply ( const value_type scalar)
inline

◆ NegationOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::NegationOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ NegationSelf()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::NegationSelf ( void )
inline

◆ NormalizedOf()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::NormalizedOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ NormalizedSelf()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::NormalizedSelf ( void )
inline

◆ operator()() [1/2]

template<class _vectorOwnerType, typename _elementType>
reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator() ( index_type index)
inline

Overloaded operator () for simplified (non-const) element access with bounds checking

◆ operator()() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator() ( index_type index) const
inline

◆ operator*=()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator*= ( const value_type scalar)
inline

◆ operator+=() [1/2]

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator+= ( const value_type scalar)
inline

◆ operator+=() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator+= ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ operator-=() [1/2]

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator-= ( const value_type scalar)
inline

◆ operator-=() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator-= ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ operator/=()

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator/= ( const value_type scalar)
inline

◆ operator=()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType, typename __elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator= ( const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > & other)
inline

◆ operator[]() [1/2]

template<class _vectorOwnerType, typename _elementType>
reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator[] ( index_type index)
inline

Access an element by index.

Returns
a reference to the element[index]

◆ operator[]() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator[] ( index_type index) const
inline

◆ Owner() [1/2]

template<class _vectorOwnerType, typename _elementType>
VectorOwnerType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Owner ( void )
inline

◆ Owner() [2/2]

template<class _vectorOwnerType, typename _elementType>
const VectorOwnerType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Owner ( void ) const
inline

◆ Pointer() [1/2]

template<class _vectorOwnerType, typename _elementType>
pointer vctDynamicVectorBase< _vectorOwnerType, _elementType >::Pointer ( index_type index = 0)
inline

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

◆ Pointer() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_pointer vctDynamicVectorBase< _vectorOwnerType, _elementType >::Pointer ( index_type index = 0) const
inline

◆ ProductOf() [1/4]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ProductOf ( const value_type scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector )
inline

◆ ProductOf() [2/4]

template<class _vectorOwnerType, typename _elementType>
template<class __matrixOwnerType, class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ProductOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & inputMatrix,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & inputVector )
inline

Product of a matrix and a vector.

Parameters
inputMatrixThe first operand of the binary operation
inputVectorThe second operand of the binary operation
Returns
The vector "this" modified.

◆ ProductOf() [3/4]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType, class __matrixOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ProductOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & inputVector,
const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & inputMatrix )
inline

Product of a vector and a matrix.

Parameters
inputVectorThe first operand of the binary operation
inputMatrixThe second operand of the binary operation
Returns
The vector "this" modified.

◆ ProductOf() [4/4]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::ProductOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector,
const value_type scalar )
inline

◆ RatioOf() [1/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::RatioOf ( const value_type scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector )
inline

◆ RatioOf() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::RatioOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector,
const value_type scalar )
inline

◆ rbegin() [1/2]

template<class _vectorOwnerType, typename _elementType>
reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::rbegin ( void )
inline

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

◆ rbegin() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::rbegin ( void ) const
inline

◆ Ref() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::Ref ( const size_type size,
const size_type startPosition = 0 )
inline

Create a reference to a sub vector

◆ Ref() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::Ref ( const size_type size,
const size_type startPosition = 0 ) const
inline

◆ rend() [1/2]

template<class _vectorOwnerType, typename _elementType>
reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::rend ( void )
inline

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

◆ rend() [2/2]

template<class _vectorOwnerType, typename _elementType>
const_reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::rend ( void ) const
inline

◆ SelectFrom()

template<class _vectorOwnerType, typename _elementType>
template<class __inputVectorOwner, class __indexVectorOwner>
void vctDynamicVectorBase< _vectorOwnerType, _elementType >::SelectFrom ( const vctDynamicConstVectorBase< __inputVectorOwner, _elementType > & input,
const vctDynamicConstVectorBase< __indexVectorOwner, index_type > & index )
inline

Select a subset of elements by a given sequence of indexes. The selected elements from the input vector are stored in this vector. There is no requirement of order or uniqueness in the indexes sequence, and no verification that the indexes are valid.

◆ SetAll()

template<class _vectorOwnerType, typename _elementType>
value_type vctDynamicVectorBase< _vectorOwnerType, _elementType >::SetAll ( const value_type value)
inline

Assign the given value to all the elements.

Parameters
valuethe value used to set all the elements of the vector
Returns
The value used to set all the elements

◆ Subtract() [1/2]

template<class _vectorOwnerType, typename _elementType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Subtract ( const value_type scalar)
inline

◆ Subtract() [2/2]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Subtract ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

◆ SumOf() [1/3]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::SumOf ( const value_type scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector )
inline

Binary elementwise operations between a scalar and a vector. For each element of the vector "this", performs \( this[i] \leftarrow op(scalar, vector[i])\) where \(op\) is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ProductOf), a division (RatioOf), a minimum (ClippedAboveOf) or a maximum (ClippedBelowOf).

Parameters
scalarThe first operand of the binary operation.
vectorThe second operand of the binary operation.
Returns
The vector "this" modified.

◆ SumOf() [2/3]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::SumOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > & vector,
const value_type scalar )
inline

Binary elementwise operations between a vector and a scalar. For each element of the vector "this", performs \( this[i] \leftarrow op(vector[i], scalar)\) where \(op\) is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ProductOf), a division (RatioOf), a minimum (ClippedAboveOf) or a maximum (ClippedBelowOf).

Parameters
vectorThe first operand of the binary operation.
scalarThe second operand of the binary operation.
Returns
The vector "this" modified.

◆ SumOf() [3/3]

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::SumOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & vector1,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & vector2 )
inline

Binary elementwise operations between two vectors. For each element of the vectors, performs \( this[i] \leftarrow op(vector1[i], vector2[i])\) where \(op\) is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ElementwiseProductOf), a division (ElementwiseRatioOf), a minimum (ElementwiseMinOf) or a maximum (ElementwiseMaxOf).

Parameters
vector1The first operand of the binary operation
vector2The second operand of the binary operation
Returns
The vector "this" modified.

◆ SwapElementsWith()

template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType>
ThisType & vctDynamicVectorBase< _vectorOwnerType, _elementType >::SwapElementsWith ( vctDynamicVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

Swap the elements of both vectors with each other.

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorBase< _vectorOwnerType, _elementType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType )

◆ W() [1/2]

template<class _vectorOwnerType, typename _elementType>
value_type & vctDynamicVectorBase< _vectorOwnerType, _elementType >::W ( void )
inline

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

◆ W() [2/2]

template<class _vectorOwnerType, typename _elementType>
const value_type & vctDynamicVectorBase< _vectorOwnerType, _elementType >::W ( void ) const
inline

◆ X() [1/2]

template<class _vectorOwnerType, typename _elementType>
value_type & vctDynamicVectorBase< _vectorOwnerType, _elementType >::X ( void )
inline

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

◆ X() [2/2]

template<class _vectorOwnerType, typename _elementType>
const value_type & vctDynamicVectorBase< _vectorOwnerType, _elementType >::X ( void ) const
inline

◆ XW() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XW ( void )
inline

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

◆ XW() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XW ( void ) const
inline

◆ XY() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XY ( void )
inline

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

◆ XY() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XY ( void ) const
inline

◆ XYZ() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XYZ ( void )
inline

Return a (non-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.

◆ XYZ() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XYZ ( void ) const
inline

◆ XYZW() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XYZW ( void )
inline

Return a (non-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.

◆ XYZW() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XYZW ( void ) const
inline

◆ XZ() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XZ ( void )
inline

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

◆ XZ() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::XZ ( void ) const
inline

◆ Y() [1/2]

template<class _vectorOwnerType, typename _elementType>
value_type & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Y ( void )
inline

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

◆ Y() [2/2]

template<class _vectorOwnerType, typename _elementType>
const value_type & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Y ( void ) const
inline

◆ YW() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::YW ( void )
inline

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

◆ YW() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::YW ( void ) const
inline

◆ YZ() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::YZ ( void )
inline

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

◆ YZ() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::YZ ( void ) const
inline

◆ YZW() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::YZW ( void )
inline

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

◆ YZW() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::YZW ( void ) const
inline

◆ Z() [1/2]

template<class _vectorOwnerType, typename _elementType>
value_type & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Z ( void )
inline

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

◆ Z() [2/2]

template<class _vectorOwnerType, typename _elementType>
const value_type & vctDynamicVectorBase< _vectorOwnerType, _elementType >::Z ( void ) const
inline

◆ Zeros()

template<class _vectorOwnerType, typename _elementType>
bool vctDynamicVectorBase< _vectorOwnerType, _elementType >::Zeros ( void )
inline

Assign zero to all elements. This methods assumes that the element type has a zero and this zero value can be set using memset(0). If the vector is not compact this method will use SetAll(0) and memset otherwise. This provides a slightly more efficent way to set all elements to zero.

Returns
true if the vector is compact and memset was used, false otherwise.

◆ ZW() [1/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::ZW ( void )
inline

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

◆ ZW() [2/2]

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef< _elementType > vctDynamicVectorBase< _vectorOwnerType, _elementType >::ZW ( void ) const
inline

◆ vctDynamicVectorLoopEngines

template<class _vectorOwnerType, typename _elementType>
friend class vctDynamicVectorLoopEngines
friend

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