[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
Wrapper for fixed size vectors. More...
#include <vigra/tinyvector.hxx>
Public Member Functions | |
template<class U, class DATA, class DERIVED> | |
TinyVectorView & | operator= (TinyVectorBase< U, SIZE, DATA, DERIVED > const &r) |
TinyVectorView & | operator= (TinyVectorView const &r) |
TinyVectorView () | |
TinyVectorView (const_pointer data) | |
template<class DATA, class DERIVED> | |
TinyVectorView (TinyVectorBase< T, SIZE, DATA, DERIVED > const &other) | |
TinyVectorView (TinyVectorView const &other) | |
![]() | |
bool | all () const |
bool | all () const |
bool | any () const |
bool | any () const |
iterator | begin () |
iterator | begin () |
const_iterator | begin () const |
const_iterator | begin () const |
const_iterator | cbegin () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
const_iterator | cend () const |
iterator | end () |
iterator | end () |
const_iterator | end () const |
const_iterator | end () const |
void | init (Iterator i, Iterator end) |
void | init (Iterator i, Iterator end) |
void | init (value_type initial) |
void | init (value_type initial) |
NormType | magnitude () const |
NormType | magnitude () const |
T const & | maximum () const |
T const & | maximum () const |
T const & | minimum () const |
T const & | minimum () const |
TinyVectorView< T, SIZE > & | operator%= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator%= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator*= (double r) |
TinyVectorView< T, SIZE > & | operator*= (double r) |
TinyVectorView< T, SIZE > & | operator*= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator*= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator+= (double r) |
TinyVectorView< T, SIZE > & | operator+= (double r) |
TinyVectorView< T, SIZE > & | operator+= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator+= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator-= (double r) |
TinyVectorView< T, SIZE > & | operator-= (double r) |
TinyVectorView< T, SIZE > & | operator-= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator-= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator/= (double r) |
TinyVectorView< T, SIZE > & | operator/= (double r) |
TinyVectorView< T, SIZE > & | operator/= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
TinyVectorView< T, SIZE > & | operator/= (TinyVectorBase< T1, SIZE, D1, D2 > const &r) |
reference | operator[] (difference_type i) |
reference | operator[] (difference_type i) |
const_reference | operator[] (difference_type i) const |
const_reference | operator[] (difference_type i) const |
size_type | size () const |
size_type | size () const |
SquaredNormType | squaredMagnitude () const |
SquaredNormType | squaredMagnitude () const |
TinyVectorView< T, TO-FROM > | subarray () const |
TinyVectorView< T, TO-FROM > | subarray () const |
Additional Inherited Members | |
![]() | |
enum | |
typedef value_type const * | const_iterator |
typedef T const * | const_pointer |
typedef T const & | const_reference |
typedef std::ptrdiff_t | difference_type |
typedef value_type * | iterator |
typedef SquareRootTraits< SquaredNormType >::SquareRootResult | NormType |
typedef T * | pointer |
typedef T & | reference |
typedef double | scalar_multiplier |
typedef unsigned int | size_type |
typedef NormTraits< T >::SquaredNormType | SquaredNormType |
typedef T | value_type |
![]() | |
static TinyVector< T, SIZE > | linearSequence (T start=T(), T step=T(1)) |
Factory function for a linear sequence. | |
static TinyVector< T, SIZE > | linearSequence (T start=T(), T step=T(1)) |
Factory function for a linear sequence. | |
static TinyVector< T, SIZE > | unitVector (int k) |
Factory function for a unit vector for dimension k. | |
static TinyVector< T, SIZE > | unitVector (int k) |
Factory function for a unit vector for dimension k. | |
Wrapper for fixed size vectors.
This class wraps an array of size SIZE of the specified VALUETYPE. Thus, the array can be accessed with an interface similar to that of std::vector (except that there are no functions that change the size of a TinyVectorView). The TinyVectorView does not assume ownership of the given memory.
Arithmetic operations on TinyVectorViews are defined as component-wise applications of these operations. Addition and subtraction of two TinyVectorViews (+=, -=, +, -, unary -), multiplication and division of an TinyVectorViews with a double, and NumericTraits/PromoteTraits are defined, so that TinyVectorView fulfills the requirements of Linear Algebra.
VIGRA algorithms typically use VectorAccessor to access TinyVectorViews as a whole, or specific components of them.
See also:
#include <vigra/tinyvector.hxx>
Namespace: vigra
TinyVectorView | ( | ) |
Default constructor (pointer to wrapped data is NULL).
TinyVectorView | ( | const_pointer | data | ) |
Construct view for given data array
TinyVectorView | ( | TinyVectorView< T, SIZE > const & | other | ) |
Copy constructor (shallow copy).
TinyVectorView | ( | TinyVectorBase< T, SIZE, DATA, DERIVED > const & | other | ) |
Construct view from other TinyVector.
TinyVectorView & operator= | ( | TinyVectorView< T, SIZE > const & | r | ) |
Copy the data (not the pointer) of the rhs.
TinyVectorView & operator= | ( | TinyVectorBase< U, SIZE, DATA, DERIVED > const & | r | ) |
Copy the data of the rhs with cast.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|