[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
![]() |
TinyVector< T, SIZE > Class Template Reference | ![]() |
Class for fixed size vectors.This class contains an array of size SIZE of the specified VALUETYPE. The interface conforms to STL vector, except that there are no functions that change the size of a TinyVector. More...
#include <vigra/tinyvector.hxx>
Class for fixed size vectors.
This class contains an array of size SIZE of the specified VALUETYPE. The interface conforms to STL vector, except that there are no functions that change the size of a TinyVector.
Arithmetic operations on TinyVectors are defined as component-wise applications of these operations. Addition and subtraction of two TinyVectors (+=, -=, +, -, unary -), multiplication and division of an TinyVector with a double, and NumericTraits/PromoteTraits are defined, so that TinyVector fulfills the requirements of Linear Algebra.
VIGRA algorithms typically use vigra::VectorAccessor to access TinyVectors as a whole, or specific components of them.
See also:
#include <vigra/tinyvector.hxx>
Namespace: vigra
typedef BaseType::value_type value_type |
STL-compatible definition of valuetype
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
typedef BaseType::reference reference |
reference (return of operator[]).
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
const reference (return of operator[] const).
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
typedef BaseType::pointer pointer |
pointer (return of operator->).
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
typedef BaseType::const_pointer const_pointer |
const pointer (return of operator-> const).
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
typedef BaseType::iterator iterator |
STL-compatible definition of iterator
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
STL-compatible definition of const iterator
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
typedef BaseType::size_type size_type |
STL-compatible definition of size_type
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
STL-compatible definition of difference_type
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
the scalar type for the outer product
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
the vector's squared norm type
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
typedef BaseType::NormType NormType |
the vector's norm type
Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.
Reimplemented in RGBValue< VALUETYPE, RED_IDX, GREEN_IDX, BLUE_IDX >.
TinyVector | ( | value_type const & | initial | ) | [explicit] |
Construction with constant value.
Initializes all vector elements with the given value.
TinyVector | ( | Diff2D const & | initial | ) | [explicit] |
Construction with Diff2D.
Use only when SIZE == 2
.
TinyVector | ( | value_type const & | i1, |
value_type const & | i2 | ||
) |
Construction with explicit values. Call only if SIZE == 2
TinyVector | ( | value_type const & | i1, |
value_type const & | i2, | ||
value_type const & | i3 | ||
) |
Construction with explicit values. Call only if SIZE == 3
TinyVector | ( | value_type const & | i1, |
value_type const & | i2, | ||
value_type const & | i3, | ||
value_type const & | i4 | ||
) |
Construction with explicit values. Call only if SIZE == 4
TinyVector | ( | value_type const & | i1, |
value_type const & | i2, | ||
value_type const & | i3, | ||
value_type const & | i4, | ||
value_type const & | i5 | ||
) |
Construction with explicit values. Call only if SIZE == 5
TinyVector | ( | ) |
Default constructor (initializes all elements with zero).
TinyVector | ( | SkipInitializationTag | ) | [explicit] |
Construct without initializing the vector elements.
TinyVector | ( | TinyVector< T, SIZE > const & | r | ) |
Copy constructor.
TinyVector | ( | const_pointer | data | ) | [explicit] |
Constructor from C array.
TinyVector | ( | const_pointer | data, |
ReverseCopyTag | |||
) | [explicit] |
Constructor by reverse copy from C array.
Usage:
TinyVector<int, 3> v(1,2,3); TinyVector<int, 3> reverse(v.begin(), TinyVector<int, 3>::ReverseCopy);
TinyVector | ( | TinyVectorBase< U, SIZE, DATA, DERIVED > const & | r | ) |
Copy with type conversion.
TinyVector& operator= | ( | TinyVector< T, SIZE > const & | r | ) |
Copy assignment.
TinyVector& operator= | ( | TinyVectorBase< U, SIZE, DATA, DERIVED > const & | r | ) |
Copy assignment with type conversion.
TinyVector& operator= | ( | Diff2D const & | r | ) |
Assignment from Diff2D.
Use only when SIZE == 2
.
TinyVector& operator= | ( | value_type const & | v | ) |
Assignment from scalar. Will set all entries to the given value.
TinyVector& copy | ( | TinyVectorBase< U, USIZE, DATA, DERIVED > const & | r | ) |
Copy from a TinyVector with a different number of elements.
Only the first min(SIZE, USIZE)
elements are copied.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|