cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Friends | List of all members
vctDynamicVectorBase< _vectorOwnerType, _elementType > Class Template Reference

#include <vctDynamicVectorBase.h>

Inheritance diagram for vctDynamicVectorBase< _vectorOwnerType, _elementType >:
vctDynamicConstVectorBase< _vectorOwnerType, _elementType > vctDynamicVector< bool > vctDynamicVector< char > vctDynamicVector< CiA301::Object::Data > vctDynamicVector< CISSTNETLIB_DOUBLE > vctDynamicVector< CISSTNETLIB_INTEGER > vctDynamicVector< cmnClassServicesBase * > vctDynamicVector< cmnGenericObject * > vctDynamicVector< CvHistogram * > vctDynamicVector< CvRect > vctDynamicVector< double > vctDynamicVector< float > vctDynamicVector< int > vctDynamicVector< mtsFunctionWrite * > vctDynamicVector< mtsNovintHDL::DeviceData * > vctDynamicVector< mtsNovintHDLHandle * > vctDynamicVector< mtsSensableHD::DeviceData * > vctDynamicVector< mtsSensableHDHandle * > vctDynamicVector< oniPlane > vctDynamicVector< osaThread * > vctDynamicVector< PlatformType > vctDynamicVector< prmJointType > vctDynamicVector< QListWidgetItem * > vctDynamicVector< short > vctDynamicVector< std::ifstream * > vctDynamicVector< std::string > vctDynamicVector< svlCameraGeometry::_Extrinsics > vctDynamicVector< svlCameraGeometry::_Intrinsics > vctDynamicVector< svlColorSpace > vctDynamicVector< svlDraw::Internals > vctDynamicVector< svlDraw::svlDraw::Internals > vctDynamicVector< svlEllipse > vctDynamicVector< svlFile * > vctDynamicVector< svlFilterImageCenterFinderInterface * > vctDynamicVector< svlFilterOutput * > vctDynamicVector< svlImageCodecBase * > vctDynamicVector< svlImageProcessing::DI_Algorithm > vctDynamicVector< svlImageProcessing::Internals > vctDynamicVector< svlImageTracker * > vctDynamicVector< svlOverlay * > vctDynamicVector< svlPoint2D > vctDynamicVector< svlQuad > vctDynamicVector< svlRect > vctDynamicVector< svlRenderTargetBase * > vctDynamicVector< svlSampleCameraGeometry::Extrinsics > vctDynamicVector< svlSampleCameraGeometry::Intrinsics > vctDynamicVector< svlStreamProc * > vctDynamicVector< svlStreamType > vctDynamicVector< svlTarget2D > vctDynamicVector< svlVidCapSrcBase * > vctDynamicVector< svlVideoCodecBase * > vctDynamicVector< svlVideoIO::Compression * > vctDynamicVector< unsigned char > vctDynamicVector< unsigned int > vctDynamicVector< value_type > vctDynamicVector< vctDynamicMatrix< int > > vctDynamicVector< vctDynamicMatrix< unsigned char > > vctDynamicVector< vctDynamicVector< bool > > vctDynamicVector< vctDynamicVector< double > > vctDynamicVector< vctDynamicVector< int > > vctDynamicVector< vctDynamicVector< svlBlob > > vctDynamicVector< vctDynamicVector< svlImageCodecBase * > > vctDynamicVector< vctDynamicVector< svlVideoCodecBase * > > vctDynamicVector< vctDynamicVector< unsigned char > > vctDynamicVector< vctDynamicVector< unsigned int > > vctDynamicVector< vctDynamicVector< unsigned short > > vctDynamicVector< vctDynamicVector< vctFixedSizeVector > > vctDynamicVector< vctFixedSizeMatrix< double, 3, 3 > > vctDynamicVector< vctFixedSizeVector > vctDynamicVector< vctFixedSizeVector< double, 9 > > vctDynamicVector< vctFixedSizeVectorRef > vctDynamicVectorRef< CISSTNETLIB_DOUBLE > vctDynamicVectorRef< CISSTNETLIB_INTEGER > vctDynamicVectorRef< double >

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_type > 
TypeTraits
 
typedef TypeTraits::VaArgPromotion ElementVaArgPromotion
 
- Public Types inherited from vctDynamicConstVectorBase< _vectorOwnerType, _elementType >
typedef
vctDynamicConstVectorBase
< _vectorOwnerType,
_elementType > 
ThisType
 
typedef _vectorOwnerType OwnerType
 
typedef OwnerType::iterator iterator
 
typedef OwnerType::const_iterator const_iterator
 
typedef OwnerType::reverse_iterator reverse_iterator
 
typedef
OwnerType::const_reverse_iterator 
const_reverse_iterator
 
typedef vctDynamicVector
< _elementType > 
CopyType
 
typedef vctDynamicVector
< _elementType > 
VectorValueType
 
typedef vctDynamicVector
< _elementType > 
VectorReturnType
 
typedef cmnTypeTraits< value_type > TypeTraits
 
typedef TypeTraits::BoolType BoolType
 
typedef vctReturnDynamicVector
< BoolType
BoolVectorReturnType
 

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) throw (std::out_of_range)
 
const_reference at (index_type index) const throw (std::out_of_range)
 
reference operator() (index_type index) throw (std::out_of_range)
 
const_reference operator() (index_type index) const throw (std::out_of_range)
 
reference Element (index_type index)
 
const_reference Element (index_type index) const
 
value_type SetAll (const value_type value)
 
bool Zeros (void)
 
ThisTypeAssign (const value_type *elements)
 
ThisTypeAssign (value_type element0, value_type element1,...) throw (std::runtime_error)
 
template<class __vectorOwnerType , class __elementType >
ThisTypeConcatenationOf (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &otherVector, __elementType lastElement)
 
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)
 
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)
 
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) throw (std::runtime_error)
 
template<size_type __size, stride_type __stride, class __dataPtrType >
bool FastCopyOf (const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > &source, bool performSafetyChecks=true) throw (std::runtime_error)
 
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_type & X (void)
 
const value_type & X (void) const
 
value_type & Y (void)
 
const value_type & Y (void) const
 
value_type & Z (void)
 
const value_type & Z (void) const
 
value_type & W (void)
 
const value_type & W (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) throw (std::out_of_range)
 
vctDynamicConstVectorRef
< _elementType > 
Ref (const size_type size, const size_type startPosition=0) const throw (std::out_of_range)
 
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 >
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)
 
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) throw (std::runtime_error)
 
Store back unary elementwise operations.

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

ThisTypeAbsSelf (void)
 
ThisTypeNegationSelf (void)
 
ThisTypeFloorSelf (void)
 
ThisTypeCeilSelf (void)
 
ThisTypeNormalizedSelf (void) throw (std::runtime_error)
 
- Public Member Functions inherited from vctDynamicConstVectorBase< _vectorOwnerType, _elementType >
 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
 
difference_type stride () const
 
bool empty () const
 
const_reference operator[] (index_type index) const
 
const_reference at (size_type index) const throw (std::out_of_range)
 
const_reference operator() (size_type index) const throw (std::out_of_range)
 
const_reference Element (size_type index) const
 
const OwnerTypeOwner (void) const
 
const_pointer Pointer (index_type index=0) const
 
bool ValidIndex (size_type index) const
 
vctDynamicConstVectorRef
< _elementType > 
Ref (const size_type size, const size_type startPosition=0) const throw (std::out_of_range)
 
template<class __vectorOwnerType >
value_type DotProduct (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
std::string ToString (void) const
 
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
 
const value_type & X (void) const
 
const value_type & Y (void) const
 
const value_type & Z (void) const
 
const value_type & W (void) const
 
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
 
vctDynamicConstVectorRef
< _elementType > 
XYZ (void) const
 
vctDynamicConstVectorRef
< _elementType > 
YZW (void) const
 
vctDynamicConstVectorRef
< _elementType > 
XYZW (void) const
 
value_type SumOfElements (void) const
 
value_type ProductOfElements (void) const
 
value_type NormSquare (void) const
 
NormType Norm (void) const
 
bool IsNormalized (void) const
 
bool IsNormalized (_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
 
bool IsCompact (void) const
 
bool IsFortran (void) const
 
template<class __vectorOwnerType >
bool FastCopyCompatible (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &source) 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 Equal (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
bool operator== (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
bool AlmostEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector, value_type tolerance) const
 
template<class __vectorOwnerType >
bool AlmostEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
bool NotEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
bool operator!= (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
bool Lesser (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
bool LesserOrEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
bool Greater (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
bool GreaterOrEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
BoolVectorReturnType ElementwiseEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
BoolVectorReturnType ElementwiseNotEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
BoolVectorReturnType ElementwiseLesser (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
BoolVectorReturnType ElementwiseLesserOrEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
BoolVectorReturnType ElementwiseGreater (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
template<class __vectorOwnerType >
BoolVectorReturnType ElementwiseGreaterOrEqual (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) const
 
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
 
BoolVectorReturnType ElementwiseEqual (const value_type &scalar) const
 
BoolVectorReturnType ElementwiseNotEqual (const value_type &scalar) const
 
BoolVectorReturnType ElementwiseLesser (const value_type &scalar) const
 
BoolVectorReturnType ElementwiseLesserOrEqual (const value_type &scalar) const
 
BoolVectorReturnType ElementwiseGreater (const value_type &scalar) const
 
BoolVectorReturnType ElementwiseGreaterOrEqual (const value_type &scalar) const
 
VectorReturnType Abs (void) const
 
VectorReturnType Negation (void) const
 
VectorReturnType Floor (void) const
 
VectorReturnType Ceil (void) const
 
VectorReturnType Normalized (void) const throw (std::runtime_error)
 

Friends

class vctDynamicVectorLoopEngines
 

Additional Inherited Members

- Protected Member Functions inherited from vctDynamicConstVectorBase< _vectorOwnerType, _elementType >
void ThrowUnlessValidIndex (size_type index) const throw (std::out_of_range)
 
- Protected Attributes inherited from vctDynamicConstVectorBase< _vectorOwnerType, _elementType >
OwnerType Vector
 

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

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

Type of the base class.

template<class _vectorOwnerType, typename _elementType>
typedef BaseType::const_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::const_iterator
template<class _vectorOwnerType, typename _elementType>
typedef BaseType::const_reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::const_reverse_iterator
template<class _vectorOwnerType, typename _elementType>
typedef BaseType::CopyType vctDynamicVectorBase< _vectorOwnerType, _elementType >::CopyType
template<class _vectorOwnerType, typename _elementType>
typedef TypeTraits::VaArgPromotion vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementVaArgPromotion
template<class _vectorOwnerType, typename _elementType>
typedef BaseType::iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::iterator
template<class _vectorOwnerType, typename _elementType>
typedef BaseType::reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::reverse_iterator
template<class _vectorOwnerType, typename _elementType>
typedef vctDynamicVectorBase vctDynamicVectorBase< _vectorOwnerType, _elementType >::ThisType
template<class _vectorOwnerType, typename _elementType>
typedef class cmnTypeTraits< value_type > vctDynamicVectorBase< _vectorOwnerType, _elementType >::TypeTraits

Type traits for the elements of the vector.

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

Member Function Documentation

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.
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.
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.
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.
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
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::AddProductOf ( const value_type  scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector 
)
inline
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.
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.
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType , typename __elementType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Assign ( const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &  other)
inline
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
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.
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Assign ( value_type  element0,
value_type  element1,
  ... 
)
throw (std::runtime_error
)
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.
template<class _vectorOwnerType, typename _elementType>
reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::at ( index_type  index)
throw (std::out_of_range
)
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]
template<class _vectorOwnerType, typename _elementType>
const_reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::at ( index_type  index) const
throw (std::out_of_range
)
inline
template<class _vectorOwnerType, typename _elementType>
iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::begin ( void  )
inline

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

template<class _vectorOwnerType, typename _elementType>
const_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::begin ( void  ) const
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::CeilOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::CeilSelf ( void  )
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClipAbove ( const value_type  upperBound)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClipBelow ( const value_type  lowerBound)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClipIn ( const value_type  bound)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedAboveOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector,
const value_type  upperBound 
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedAboveOf ( const value_type  upperBound,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector 
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedBelowOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector,
const value_type  lowerBound 
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedBelowOf ( const value_type  lowerBound,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector 
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedInOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector,
const value_type  bound 
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ClippedInOf ( const value_type  bound,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector 
)
inline
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.

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.

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
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::DifferenceOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector,
const value_type  scalar 
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::DifferenceOf ( const value_type  scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector 
)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Divide ( const value_type  scalar)
inline
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
template<class _vectorOwnerType, typename _elementType>
const_reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::Element ( index_type  index) const
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseClipIn ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  boundVector)
inline
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
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseDivide ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseMax ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
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
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseMin ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
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
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ElementwiseMultiply ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
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
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
template<class _vectorOwnerType, typename _elementType>
iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::end ( void  )
inline

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

template<class _vectorOwnerType, typename _elementType>
const_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::end ( void  ) const
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
bool vctDynamicVectorBase< _vectorOwnerType, _elementType >::FastCopyOf ( const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &  source,
bool  performSafetyChecks = true 
)
throw (std::runtime_error
)
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);
}
}
Parameters
sourceVector used to set the content of this vector.
performSafetyChecksFlag set to false to avoid safety checks, use with extreme caution.
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 
)
throw (std::runtime_error
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::FloorOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::FloorSelf ( void  )
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType , typename __elementType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ForceAssign ( const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &  other)
inline
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
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Multiply ( const value_type  scalar)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::NegationOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::NegationSelf ( void  )
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::NormalizedOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
throw (std::runtime_error
)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::NormalizedSelf ( void  )
throw (std::runtime_error
)
inline
template<class _vectorOwnerType, typename _elementType>
reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator() ( index_type  index)
throw (std::out_of_range
)
inline

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

template<class _vectorOwnerType, typename _elementType>
const_reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator() ( index_type  index) const
throw (std::out_of_range
)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator*= ( const value_type  scalar)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator+= ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator+= ( const value_type  scalar)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator-= ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator-= ( const value_type  scalar)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator/= ( const value_type  scalar)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType , typename __elementType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator= ( const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &  other)
inline
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]
template<class _vectorOwnerType, typename _elementType>
const_reference vctDynamicVectorBase< _vectorOwnerType, _elementType >::operator[] ( index_type  index) const
inline
template<class _vectorOwnerType, typename _elementType>
const VectorOwnerType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Owner ( void  ) const
inline
template<class _vectorOwnerType, typename _elementType>
VectorOwnerType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Owner ( void  )
inline
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.

template<class _vectorOwnerType, typename _elementType>
const_pointer vctDynamicVectorBase< _vectorOwnerType, _elementType >::Pointer ( index_type  index = 0) const
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ProductOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector,
const value_type  scalar 
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::ProductOf ( const value_type  scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector 
)
inline
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.
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.
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::RatioOf ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector,
const value_type  scalar 
)
inline
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::RatioOf ( const value_type  scalar,
const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  vector 
)
inline
template<class _vectorOwnerType, typename _elementType>
reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::rbegin ( void  )
inline

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

template<class _vectorOwnerType, typename _elementType>
const_reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::rbegin ( void  ) const
inline
template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::Ref ( const size_type  size,
const size_type  startPosition = 0 
)
throw (std::out_of_range
)
inline

Create a reference to a sub vector

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::Ref ( const size_type  size,
const size_type  startPosition = 0 
) const
throw (std::out_of_range
)
inline
template<class _vectorOwnerType, typename _elementType>
reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::rend ( void  )
inline

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

template<class _vectorOwnerType, typename _elementType>
const_reverse_iterator vctDynamicVectorBase< _vectorOwnerType, _elementType >::rend ( void  ) const
inline
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.

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
template<class _vectorOwnerType, typename _elementType>
template<class __vectorOwnerType >
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Subtract ( const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &  otherVector)
inline
template<class _vectorOwnerType, typename _elementType>
ThisType& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Subtract ( const value_type  scalar)
inline
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.
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.
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.
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.

template<class _vectorOwnerType, typename _elementType>
vctDynamicVectorBase< _vectorOwnerType, _elementType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType  )
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.

template<class _vectorOwnerType, typename _elementType>
const value_type& vctDynamicVectorBase< _vectorOwnerType, _elementType >::W ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
const value_type& vctDynamicVectorBase< _vectorOwnerType, _elementType >::X ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::XW ( void  ) const
inline
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).

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::XY ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::XYZ ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::XYZW ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::XZ ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
const value_type& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Y ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::YW ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::YZ ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
vctDynamicConstVectorRef<_elementType> vctDynamicVectorBase< _vectorOwnerType, _elementType >::YZW ( void  ) const
inline
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.

template<class _vectorOwnerType, typename _elementType>
const value_type& vctDynamicVectorBase< _vectorOwnerType, _elementType >::Z ( void  ) const
inline
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.
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.

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

Friends And Related Function Documentation

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

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