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

| TinyVectorBase Class Template Reference |
--- | --- | ---

Base class for fixed size vectors. More...

`#include "vigra/tinyvector.hxx"`

## Public Types
typedef VALUETYPE | value_type
typedef VALUETYPE & | reference
typedef VALUETYPE const & | const_reference
typedef VALUETYPE * | pointer
typedef VALUETYPE const * | const_pointer
typedef value_type * | iterator
typedef value_type const * | const_iterator
typedef unsigned int | size_type
typedef int | difference_type
typedef double | scalar_multiplier
enum |
## Public Methods
template<class Iterator> void | init (Iterator i, Iterator end)
template<class T1, class D1, class D2> DERIVED & | operator+= (TinyVectorBase< T1, SIZE, D1, D2 > const &r)
template<class T1, class D1, class D2> DERIVED & | operator-= (TinyVectorBase< T1, SIZE, D1, D2 > const &r)
template<class T1, class D1, class D2> DERIVED & | operator *= (TinyVectorBase< T1, SIZE, D1, D2 > const &r)
DERIVED & | operator *= (double r)
DERIVED & | operator/= (double r)
NumericTraits< VALUETYPE >::RealPromote | magnitude () const
NumericTraits< VALUETYPE >::Promote | squaredMagnitude () const
reference | operator[] (difference_type i)
const_reference | operator[] (difference_type i) const
iterator | begin ()
iterator | end ()
const_iterator | begin () const
const_iterator | end () const
size_type | size () const

## Detailed Description

### template<class VALUETYPE, int SIZE, class DATA, class DERIVED>
class vigra::TinyVectorBase< VALUETYPE, SIZE, DATA, DERIVED >

Base class for fixed size vectors.

This class contains functionality shared by TinyVector and TinyVectorView, and enables these classes to be freely mixed within expressions. It is typically not used directly.

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

## Member Typedef Documentation

typedef value_type const* const_iterator

| STL-compatible definition of const iterator Reimplemented in RGBValue, TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef VALUETYPE const* const_pointer

| const pointer (return of operator-> const). Reimplemented in TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef VALUETYPE const& const_reference

| const reference (return of operator[] const). Reimplemented in TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef int difference_type

| STL-compatible definition of difference_type Reimplemented in TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef value_type* iterator

| STL-compatible definition of iterator Reimplemented in RGBValue, TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef VALUETYPE* pointer

| pointer (return of operator->). Reimplemented in TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef VALUETYPE& reference

| reference (return of operator[]). Reimplemented in TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef double scalar_multiplier

| the scalar type for the outer product Reimplemented in TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef unsigned int size_type

| STL-compatible definition of size_type Reimplemented in TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

typedef VALUETYPE value_type

| STL-compatible definition of valuetype Reimplemented in RGBValue, TinyVector, TinyVectorView, and TinyVector< VALUETYPE, 3 >.

## Member Enumeration Documentation

anonymous enum

| the vector's size

## Member Function Documentation

const_iterator begin | ( |  | ) | const`[inline]`

| Get const random access iterator to begin of vector.

iterator begin | ( |  | ) | `[inline]`

| Get random access iterator to begin of vector.

const_iterator end | ( |  | ) | const`[inline]`

| Get const random access iterator past-the-end of vector.

iterator end | ( |  | ) | `[inline]`

| Get random access iterator past-the-end of vector.

void init | ( | Iterator | i,
|  | Iterator | end
| ) | `[inline]`

| Initialize from another sequence (must have length SIZE!)

NumericTraits<VALUETYPE>::RealPromote magnitude | ( |  | ) | const`[inline]`

| Calculate magnitude. Reimplemented in RGBValue.

DERIVED& operator *= | ( | double | r | ) | `[inline]`

| Component-wise scalar multiply-assignment

DERIVED& operator *= | ( | TinyVectorBase< T1, SIZE, D1, D2 > const & | r | ) | `[inline]`

| Component-wise multiply-assignment

DERIVED& operator+= | ( | TinyVectorBase< T1, SIZE, D1, D2 > const & | r | ) | `[inline]`

| Component-wise add-assignment

DERIVED& operator-= | ( | TinyVectorBase< T1, SIZE, D1, D2 > const & | r | ) | `[inline]`

| Component-wise subtract-assignment

DERIVED& operator/= | ( | double | r | ) | `[inline]`

| Component-wise scalar divide-assignment

const_reference operator[] | ( | difference_type | i | ) | const`[inline]`

| Get component by index.

reference operator[] | ( | difference_type | i | ) | `[inline]`

| Access component by index.

size_type size | ( |  | ) | const`[inline]`

| Size of TinyVector vector always equals the template parameter SIZE.

NumericTraits<VALUETYPE>::Promote squaredMagnitude | ( |  | ) | const`[inline]`

| Calculate squared magnitude. Reimplemented in RGBValue.

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.3.2 (27 Jan 2005)