[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

details TinyVectorView< T, SIZE > Class Template Reference VIGRA

Wrapper for fixed size vectors. More...

#include <vigra/tinyvector.hxx>

Inheritance diagram for TinyVectorView< T, SIZE >:
TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >

Public Member Functions

TinyVectorViewoperator= (TinyVectorView const &r)
 
template<class U , class DATA , class DERIVED >
TinyVectorViewoperator= (TinyVectorBase< U, SIZE, DATA, DERIVED > const &r)
 
 TinyVectorView ()
 
 TinyVectorView (const_pointer data)
 
 TinyVectorView (TinyVectorView const &other)
 
template<class DATA , class DERIVED >
 TinyVectorView (TinyVectorBase< T, SIZE, DATA, DERIVED > const &other)
 
- Public Member Functions inherited from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >
bool all () const
 
bool any () const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
iterator end ()
 
const_iterator end () const
 
void init (Iterator i, Iterator end)
 
void init (value_type initial)
 
NormType magnitude () const
 
Tconst & maximum () const
 
Tconst & 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+= (TinyVectorBase< T1, SIZE, D1, D2 > const &r)
 
TinyVectorView< T, SIZE > & operator+= (double r)
 
TinyVectorView< T, SIZE > & operator-= (TinyVectorBase< T1, SIZE, D1, D2 > const &r)
 
TinyVectorView< T, SIZE > & operator-= (double r)
 
TinyVectorView< T, SIZE > & operator/= (TinyVectorBase< T1, SIZE, D1, D2 > const &r)
 
TinyVectorView< T, SIZE > & operator/= (double r)
 
reference operator[] (difference_type i)
 
const_reference operator[] (difference_type i) const
 
size_type size () const
 
SquaredNormType squaredMagnitude () const
 
TinyVectorView< T, TO-FROM > subarray () const
 

Additional Inherited Members

- Public Types inherited from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >
typedef value_type const * const_iterator
 
typedef Tconst * const_pointer
 
typedef Tconst & const_reference
 
typedef std::ptrdiff_t difference_type
 
typedef value_typeiterator
 
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 Public Member Functions inherited from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >
static TinyVector< T, SIZE > linearSequence (Tstart=T(), Tstep=T(1))
 Factory function for a linear sequence. More...
 
static TinyVector< T, SIZE > unitVector (int k)
 Factory function for a unit vector for dimension k.
 

Detailed Description

template<class T, int SIZE>
class vigra::TinyVectorView< T, SIZE >

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 vigra::VectorAccessor to access TinyVectorViews as a whole, or specific components of them.

See also:

#include <vigra/tinyvector.hxx>
Namespace: vigra

Constructor & Destructor Documentation

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.

Member Function Documentation

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.


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

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.11.0