VIGRA - TemplateTinyVectorView class Reference

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

| TinyVectorView Class Template Reference |
--- | --- | ---

Wrapper for fixed size vectors. More...

`#include "vigra/tinyvector.hxx"`

Inheritance diagram for TinyVectorView:

## Public Types
typedef BaseType::value_type | value_type
typedef BaseType::reference | reference
typedef BaseType::const_reference | const_reference
typedef BaseType::pointer | pointer
typedef BaseType::const_pointer | const_pointer
typedef BaseType::iterator | iterator
typedef BaseType::const_iterator | const_iterator
typedef BaseType::size_type | size_type
typedef BaseType::difference_type | difference_type
typedef BaseType::scalar_multiplier | scalar_multiplier
typedef BaseType::SquaredNormType | SquaredNormType
typedef BaseType::NormType | NormType
## Public Methods
| TinyVectorView ()
| TinyVectorView (const_pointer data)
| TinyVectorView (TinyVectorView const &other)
template<class DATA, class DERIVED> | TinyVectorView (TinyVectorBase< T, SIZE, DATA, DERIVED > const &other)
TinyVectorView & | operator= (TinyVectorView const &r)
template<class U, class DATA, class DERIVED> TinyVectorView & | operator= (TinyVectorBase< U, SIZE, DATA, DERIVED > const &r)

## 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 LinearAlgebra.

VIGRA algorithms typically use vigra::VectorAccessor to access TinyVectorViews as a whole, or specific components of them.

See also:

- vigra::TinyVectorBase
- vigra::TinyVector
- Numeric and Promote Traits of TinyVector
- Functions for TinyVector

#include "vigra/tinyvector.hxx"
Namespace: vigra

## Member Typedef Documentation

typedef BaseType::const_iterator const_iterator

| STL-compatible definition of const iterator Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::const_pointer const_pointer

| const pointer (return of operator-> const). Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::const_reference const_reference

| const reference (return of operator[] const). Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::difference_type difference_type

| STL-compatible definition of difference_type Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::iterator iterator

| STL-compatible definition of iterator Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::NormType NormType

| the vector's norm type Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::pointer pointer

| pointer (return of operator->). Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::reference reference

| reference (return of operator[]). Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::scalar_multiplier scalar_multiplier

| the scalar type for the outer product Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::size_type size_type

| STL-compatible definition of size_type Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::SquaredNormType SquaredNormType

| the vector's squared norm type Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

typedef BaseType::value_type value_type

| STL-compatible definition of valuetype Reimplemented from TinyVectorBase< T, SIZE, T *, TinyVectorView< T, SIZE > >.

## Constructor & Destructor Documentation

TinyVectorView | ( |  | ) | `[inline]`

| Default constructor (pointer to wrapped data is NULL).

TinyVectorView | ( | const_pointer | data | ) | `[inline]`

| Construct view for given data array

TinyVectorView | ( | TinyVectorView< T, SIZE > const & | other | ) | `[inline]`

| Copy constructor (shallow copy).

TinyVectorView | ( | TinyVectorBase< T, SIZE, DATA, DERIVED > const & | other | ) | `[inline]`

| Construct view from other TinyVector.

## Member Function Documentation

TinyVectorView& operator= | ( | TinyVectorBase< U, SIZE, DATA, DERIVED > const & | r | ) | `[inline]`

| Copy the data of the rhs with cast.

TinyVectorView& operator= | ( | TinyVectorView< T, SIZE > const & | r | ) | `[inline]`

| Copy the data (not the pointer) of the rhs.

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

- vigra/tinyvector.hxx

© Ullrich Köthe (koethe@informatik.uni-hamburg.de) Cognitive Systems Group, University of Hamburg, Germany | html generated using doxygen and Python VIGRA 1.5.0 (7 Dec 2006)