|
| | VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType) |
| | vctDynamicVectorRef () |
| | vctDynamicVectorRef (const ThisType &other) |
| | vctDynamicVectorRef (size_type size, value_type *data, stride_type stride=1) |
| template<size_type __size, stride_type __stride, class __dataPtrType> |
| | vctDynamicVectorRef (vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > &otherVector, size_type startPosition=0) |
| template<size_type __size, stride_type __stride, class __dataPtrType> |
| | vctDynamicVectorRef (vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > &otherVector, size_type startPosition, size_type length) |
| template<class __vectorOwnerType> |
| | vctDynamicVectorRef (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| template<class __vectorOwnerType> |
| | vctDynamicVectorRef (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector, size_type startPosition, size_type length) |
| void | SetRef (size_type size, pointer data, stride_type stride=1) |
| template<size_type __size, stride_type __stride, class __dataPtrType> |
| void | SetRef (vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > &otherVector, size_type startPosition=0) |
| template<size_type __size, stride_type __stride, class __dataPtrType> |
| void | SetRef (vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > &otherVector, size_type startPosition, size_type length) CISST_THROW(std |
| template<class __vectorOwnerType> |
| void | SetRef (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| template<class __vectorOwnerType> |
| void | SetRef (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector, size_type startPosition, size_type length) CISST_THROW(std |
| ThisType & | operator= (const ThisType &other) |
| ThisType & | operator= (const vctDynamicConstVectorRef< value_type > &other) |
| template<class __vectorOwnerType, typename __elementType> |
| ThisType & | operator= (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other) |
| template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType> |
| ThisType & | operator= (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other) |
| ThisType & | operator= (const value_type &value) |
| void | DeSerializeRaw (std::istream &inputStream) CISST_THROW(std |
| | 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 VectorOwnerType & | Owner (void) const |
| VectorOwnerType & | Owner (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) |
| ThisType & | Assign (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &other) |
| ThisType & | Assign (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &other, size_type length, size_type startPositionThis=0, size_type startPositionOther=0) |
| ThisType & | Assign (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other) |
| ThisType & | operator= (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other) |
| ThisType & | Assign (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other) |
| ThisType & | ForceAssign (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other) |
| ThisType & | ForceAssign (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other) |
| bool | FastCopyOf (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &source, bool performSafetyChecks=true) CISST_THROW(std |
| bool | FastCopyOf (const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > &source, bool performSafetyChecks=true) CISST_THROW(std |
| ThisType & | Assign (const value_type *elements) |
| ThisType & | Assign (value_type element0, value_type element1,...) CISST_THROW(std |
| ThisType & | ConcatenationOf (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &otherVector, __elementType lastElement) |
| 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) CISST_THROW(std |
| vctDynamicConstVectorRef< _elementType > | Ref (const size_type size, const size_type startPosition=0) const CISST_THROW(std |
| void | SelectFrom (const vctDynamicConstVectorBase< __inputVectorOwner, _elementType > &input, const vctDynamicConstVectorBase< __indexVectorOwner, index_type > &index) |
| void | CrossProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &inputVector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &inputVector2) |
| ThisType & | SumOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2) |
| ThisType & | DifferenceOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2) |
| ThisType & | ElementwiseProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2) |
| ThisType & | ElementwiseRatioOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2) |
| ThisType & | ElementwiseMinOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2) |
| ThisType & | ElementwiseMaxOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2) |
| ThisType & | ElementwiseClippedInOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &boundVector, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector) |
| ThisType & | Add (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | Subtract (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | ElementwiseMultiply (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | ElementwiseDivide (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | ElementwiseMin (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | ElementwiseMax (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | ElementwiseClipAbove (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &upperBoundVector) |
| ThisType & | ElementwiseClipBelow (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &lowerBoundVector) |
| ThisType & | ElementwiseClipIn (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &boundVector) |
| ThisType & | operator+= (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | operator-= (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | SwapElementsWith (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | SumOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar) |
| ThisType & | DifferenceOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar) |
| ThisType & | ProductOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar) |
| ThisType & | RatioOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar) |
| ThisType & | ClippedAboveOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type upperBound) |
| ThisType & | ClippedBelowOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type lowerBound) |
| ThisType & | ClippedInOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type bound) |
| ThisType & | SumOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector) |
| ThisType & | DifferenceOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector) |
| ThisType & | ProductOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector) |
| ThisType & | RatioOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector) |
| ThisType & | ClippedAboveOf (const value_type upperBound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector) |
| ThisType & | ClippedBelowOf (const value_type lowerBound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector) |
| ThisType & | ClippedInOf (const value_type bound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector) |
| ThisType & | Add (const value_type scalar) |
| ThisType & | Subtract (const value_type scalar) |
| ThisType & | Multiply (const value_type scalar) |
| ThisType & | Divide (const value_type scalar) |
| ThisType & | ClipAbove (const value_type upperBound) |
| ThisType & | ClipBelow (const value_type lowerBound) |
| ThisType & | ClipIn (const value_type bound) |
| ThisType & | operator+= (const value_type scalar) |
| ThisType & | operator-= (const value_type scalar) |
| ThisType & | operator*= (const value_type scalar) |
| ThisType & | operator/= (const value_type scalar) |
| ThisType & | AddProductOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | AddElementwiseProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2) |
| ThisType & | ProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &inputVector) |
| ThisType & | ProductOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &inputVector, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix) |
| ThisType & | AbsOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | NegationOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | FloorOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | CeilOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) |
| ThisType & | NormalizedOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) CISST_THROW(std |
| ThisType & | AbsSelf (void) |
| ThisType & | NegationSelf (void) |
| ThisType & | FloorSelf (void) |
| ThisType & | CeilSelf (void) |
| ThisType & | NormalizedSelf (void) CISST_THROW(std |
template<class _elementType>
class vctDynamicVectorRef< _elementType >
Dynamic vector referencing existing memory.
The class vctDynamicVectorRef allows to create a vector overlaying an existing block of memory. It can be used to manipulate a container created by another toolkit (i.e. OpenGL, vtk, ...) or a cisstVector container using different parameters (different size, storage order or stride).
To setup the overlay, one can use either the constructors or the SetRef methods. When used with a cisst container, the SetRef methods can infer some of the memory layout information (pointer on first element, size, stride). When used to overlay existing memory referenced by a pointer, the user has to provide all the required information. In any case, the Ref object doesn't allocate nor free memory.
For example to manipulate the first five elements of a vector, one can do:
first5.
SetRef(wholeVector, 0, 5);
value_type SetAll(const value_type value)
Definition vctDynamicVectorBase.h:209
Definition vctForwardDeclarations.h:131
vctDynamicVectorRef()
Definition vctDynamicVectorRef.h:91
void SetRef(size_type size, pointer data, stride_type stride=1)
Definition vctDynamicVectorRef.h:156
void vctRandom(vctDynamicMatrixBase< _matrixOwnerType, _elementType > &matrix, const typename vctDynamicMatrixBase< _matrixOwnerType, _elementType >::value_type min, const typename vctDynamicMatrixBase< _matrixOwnerType, _elementType >::value_type max)
Definition vctRandomDynamicMatrix.h:47
- Note
- Make sure the underlying memory is not freed after the Ref object is created and before it is used. This would lead to faulty memory access and potential bugs.
-
vctDynamicVectorRef can perform const and non-const operations. It can be initialized with a non-const object only (
value_type *). For a const Ref, see vctDynamicConstVectorRef.
- See also
- vctDynamicVector, vctDynamicConstVectorRef
- Parameters
-