|
cisst-saw
|
Declaration of vctDynamicVector. More...
#include <cisstCommon/cmnDeSerializer.h>#include <cisstVector/vctDynamicVectorBase.h>#include <cisstVector/vctDynamicVectorOwner.h>#include <cisstVector/vctDynamicVectorRef.h>Go to the source code of this file.
Classes | |
| class | vctReturnDynamicVector< _elementType > |
Macros | |
| #define | _vctDynamicVector_h |
Functions | |
| vctDynamicVector () | |
| A vector object of dynamic size. | |
| vctDynamicVector (size_type size) | |
| vctDynamicVector (size_type size, value_type value) | |
| vctDynamicVector (size_type size, value_type element0, value_type element1,...) CISST_THROW(std | |
| vctDynamicVector (size_type size, const value_type *values) | |
| vctDynamicVector (const vctReturnDynamicVector< value_type > &otherVector) | |
| vctDynamicVector (const ThisType &otherVector) | |
| template<class _otherVectorOwnerType> | |
| vctDynamicVector (const vctDynamicConstVectorBase< _otherVectorOwnerType, value_type > &otherVector) | |
| template<class _otherVectorOwnerType, typename _otherVectorElementType> | |
| vctDynamicVector (const vctDynamicConstVectorBase< _otherVectorOwnerType, _otherVectorElementType > &otherVector) | |
| template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType> | |
| vctDynamicVector (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &fixedVector) | |
| template<class __vectorOwnerType, typename __elementType> | |
| ThisType & | operator= (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &otherVector) |
| ThisType & | operator= (const ThisType &other) |
| ThisType & | operator= (const vctReturnDynamicVector< value_type > &other) |
| ThisType & | operator= (const value_type &value) |
| template<class __vectorOwnerType, typename __elementType> | |
| ThisType & | ForceAssign (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other) |
| template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType> | |
| ThisType & | ForceAssign (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other) |
| void | resize (size_type size) |
| void | SetSize (size_type size) |
| void | SetSize (size_type size, const value_type newValue) |
| bool | FromStreamRaw (std::istream &inputStream, const char delimiter=' ') |
| void | DeSerializeRaw (std::istream &inputStream) |
Elementwise operations between dynamic vectors. | |
| template<class _vectorOwnerType1, class _vectorOwnerType2, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator+ (const vctDynamicConstVectorBase< _vectorOwnerType1, _elementType > &inputVector1, const vctDynamicConstVectorBase< _vectorOwnerType2, _elementType > &inputVector2) |
| template<class _vectorOwnerType1, class _vectorOwnerType2, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator- (const vctDynamicConstVectorBase< _vectorOwnerType1, _elementType > &inputVector1, const vctDynamicConstVectorBase< _vectorOwnerType2, _elementType > &inputVector2) |
Cross product between dynamic vectors. | |
| template<class _vectorOwnerType1, class _vectorOwnerType2, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator% (const vctDynamicConstVectorBase< _vectorOwnerType1, _elementType > &inputVector1, const vctDynamicConstVectorBase< _vectorOwnerType2, _elementType > &inputVector2) |
| template<class _vectorOwnerType1, class _vectorOwnerType2, class _elementType> | |
| vctReturnDynamicVector< _elementType > | vctCrossProduct (const vctDynamicConstVectorBase< _vectorOwnerType1, _elementType > &inputVector1, const vctDynamicConstVectorBase< _vectorOwnerType2, _elementType > &inputVector2) |
Elementwise operations between a dynamic vector and a | |
scalar. | |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator+ (const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector, const _elementType &inputScalar) |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator- (const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector, const _elementType &inputScalar) |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator* (const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector, const _elementType &inputScalar) |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator/ (const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector, const _elementType &inputScalar) |
Elementwise operations between a scalar and a dynamic | |
vector. | |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator+ (const _elementType &inputScalar, const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector) |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator- (const _elementType &inputScalar, const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector) |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator* (const _elementType &inputScalar, const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector) |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator/ (const _elementType &inputScalar, const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector) |
Elementwise operations on a dynamic vector. | |
| template<class _vectorOwnerType, class _elementType> | |
| vctReturnDynamicVector< _elementType > | operator- (const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &inputVector) |
| template<class _vectorOwnerType, class __vectorOwnerType, class _elementType, class _elementOperationType> | |
| vctReturnDynamicVector< bool > | vctDynamicVectorElementwiseCompareVector (const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &vector1, const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &vector2) |
| template<class _vectorOwnerType, class _elementType, class _elementOperationType> | |
| vctReturnDynamicVector< bool > | vctDynamicVectorElementwiseCompareScalar (const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &vector, const _elementType &scalar) |
Declaration of vctDynamicVector.
| #define _vctDynamicVector_h |
| void DeSerializeRaw | ( | std::istream & | inputStream | ) |
Binary deserialization
|
inline |
|
inline |
| bool FromStreamRaw | ( | std::istream & | inputStream, |
| const char | delimiter = ' ' ) |
Read from an unformatted text input (e.g., one created by ToStreamRaw). Returns true if successful. This particular implementation assumes that the correct vector size is already set.
| vctReturnDynamicVector< _elementType > operator% | ( | const vctDynamicConstVectorBase< _vectorOwnerType1, _elementType > & | inputVector1, |
| const vctDynamicConstVectorBase< _vectorOwnerType2, _elementType > & | inputVector2 ) |
The cross product between two dynamic vectors will assert that both input vectors are of size 3.
| inputVector1 | left operand of the cross product |
| inputVector2 | right operand of the cross product |
| vctReturnDynamicVector< _elementType > operator* | ( | const _elementType & | inputScalar, |
| const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector ) |
| vctReturnDynamicVector< _elementType > operator* | ( | const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector, |
| const _elementType & | inputScalar ) |
| vctReturnDynamicVector< _elementType > operator+ | ( | const _elementType & | inputScalar, |
| const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector ) |
Operation between a scalar and a dynamic vector.
| inputScalar | The first operand of the binary operation. |
| inputVector | The second operand of the binary operation. |
| vctReturnDynamicVector< _elementType > operator+ | ( | const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector, |
| const _elementType & | inputScalar ) |
Operation between a dynamic vector and a scalar.
| inputVector | The first operand of the binary operation. |
| inputScalar | The second operand of the binary operation. |
| vctReturnDynamicVector< _elementType > operator+ | ( | const vctDynamicConstVectorBase< _vectorOwnerType1, _elementType > & | inputVector1, |
| const vctDynamicConstVectorBase< _vectorOwnerType2, _elementType > & | inputVector2 ) |
Operation between dynamic vectors (same size).
| inputVector1 | The first operand of the binary operation. |
| inputVector2 | The second operand of the binary operation. |
| vctReturnDynamicVector< _elementType > operator- | ( | const _elementType & | inputScalar, |
| const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector ) |
| vctReturnDynamicVector< _elementType > operator- | ( | const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector | ) |
Unary operation on a dynamic vector.
| inputVector | The operand of the unary operation |
| vctReturnDynamicVector< _elementType > operator- | ( | const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector, |
| const _elementType & | inputScalar ) |
| vctReturnDynamicVector< _elementType > operator- | ( | const vctDynamicConstVectorBase< _vectorOwnerType1, _elementType > & | inputVector1, |
| const vctDynamicConstVectorBase< _vectorOwnerType2, _elementType > & | inputVector2 ) |
| vctReturnDynamicVector< _elementType > operator/ | ( | const _elementType & | inputScalar, |
| const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector ) |
| vctReturnDynamicVector< _elementType > operator/ | ( | const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > & | inputVector, |
| const _elementType & | inputScalar ) |
Assignment from a dynamic vector to this vector. The operation discards the old memory allocated for this vector, and allocates new memory the size of the input vector. Then the elements of the input vector are copied into this vector.
|
inline |
Assignement of a scalar to all elements. See also SetAll.
| ThisType & operator= | ( | const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > & | otherVector | ) |
Assignment from a dynamic vector to a vector. The operation discards the old memory allocated for this vector, and allocates new memory the size of the input vector. Then the elements of the input vector are copied into this vector.
| ThisType & operator= | ( | const vctReturnDynamicVector< value_type > & | other | ) |
Assignement from a transitional vctReturnDynamicVector to a vctDynamicVector variable. This specialized operation does not perform any element copy. Instead it transfers ownership of the data from the other vector to this vector, and disowns the other vector. The right hand side operand must be a temporary object returned, e.g., from a function or overloaded operator.
| void resize | ( | size_type | size | ) |
Non-destructive size change. Change the size to the specified size, and copy as many elements as possible from the former vector.
| void SetSize | ( | size_type | size | ) |
DESTRUCTIVE size change. Change the size to the specified size. Discard of all the old values.
| void SetSize | ( | size_type | size, |
| const value_type | newValue ) |
| vctReturnDynamicVector< _elementType > vctCrossProduct | ( | const vctDynamicConstVectorBase< _vectorOwnerType1, _elementType > & | inputVector1, |
| const vctDynamicConstVectorBase< _vectorOwnerType2, _elementType > & | inputVector2 ) |
| vctDynamicVector | ( | const ThisType & | otherVector | ) |
Copy constructor: Allocate memory to store a copy of the other vector, and copy the elements of the other vector to this vector.
|
explicit |
Copy constructor: Allocate memory and copy all the elements from the other vector. This constructor can also be used for type conversions.
| vctDynamicVector | ( | const vctDynamicConstVectorBase< _otherVectorOwnerType, value_type > & | otherVector | ) |
Copy constructor: Allocate memory and copy all the elements from the other vector.
|
explicit |
Constructor from a fixed-size vector
| vctDynamicVector | ( | const vctReturnDynamicVector< value_type > & | otherVector | ) |
Special copy constructor: Take ownership of the data of a temporary vector object of type vctReturnDynamicVector. Disown the other vector.
|
explicit |
Constructor: Create a vector of the specified size. Elements initialized with default constructor.
| vctDynamicVector | ( | size_type | size, |
| const value_type * | values ) |
Constructor: Create a vector of the specified size and assign the elements values from the memory block pointed to
| vctDynamicVector | ( | size_type | size, |
| value_type | element0, | ||
| value_type | element1, | ||
| ... ) |
Constructor for any size greater than or equal to 2, 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.
| vctDynamicVector | ( | size_type | size, |
| value_type | value ) |
Constructor: Create a vector of the specified size and assign all elements a specific value.
|
inline |
|
inline |