[ 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
 
VALUETYPE const & maximum () const
 
VALUETYPE const & minimum () const
 
DERIVED & operator%= (TinyVectorBase< T1, SIZE, T *, TinyVectorView< T, SIZE > > const &r)
 
DERIVED & operator*= (TinyVectorBase< T1, SIZE, T *, TinyVectorView< T, SIZE > > const &r)
 
DERIVED & operator*= (double r)
 
DERIVED & operator+= (TinyVectorBase< T1, SIZE, T *, TinyVectorView< T, SIZE > > const &r)
 
DERIVED & operator+= (double r)
 
DERIVED & operator-= (TinyVectorBase< T1, SIZE, T *, TinyVectorView< T, SIZE > > const &r)
 
DERIVED & operator-= (double r)
 
DERIVED & operator/= (TinyVectorBase< T1, SIZE, T *, TinyVectorView< T, SIZE > > const &r)
 
DERIVED & operator/= (double r)
 
reference operator[] (difference_type i)
 
const_reference operator[] (difference_type i) const
 
size_type size () const
 
SquaredNormType squaredMagnitude () const
 
TinyVectorView< VALUETYPE, TO-FROM > subarray () const
 

Additional Inherited Members

- Public Types inherited from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >
enum  
 
typedef value_type const * const_iterator
 
typedef VALUETYPE const * const_pointer
 
typedef VALUETYPE const & const_reference
 
typedef std::ptrdiff_t difference_type
 
typedef value_typeiterator
 
typedef SquareRootTraits
< SquaredNormType >
::SquareRootResult 
NormType
 
typedef VALUETYPE * pointer
 
typedef VALUETYPE & reference
 
typedef double scalar_multiplier
 
typedef unsigned int size_type
 
typedef NormTraits< VALUETYPE >
::SquaredNormType 
SquaredNormType
 
typedef VALUETYPE value_type
 
- Static Public Member Functions inherited from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >
static TinyVector< VALUETYPE,
SIZE > 
linearSequence (VALUETYPE start=VALUETYPE(), VALUETYPE step=VALUETYPE(1))
 Factory function for a linear sequence. More...
 
static TinyVector< VALUETYPE,
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.1 (Fri May 19 2017)