VIGRA - TemplateTinyVector class Reference

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

| TinyVector Class Template Reference |
--- | --- | ---

Class for fixed size vectors. More...

`#include "vigra/tinyvector.hxx"`

Inheritance diagram for TinyVector:

## 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
| TinyVector (value_type const &initial)
| TinyVector (value_type const &i1, value_type const &i2)
| TinyVector (value_type const &i1, value_type const &i2, value_type const &i3)
| TinyVector (value_type const &i1, value_type const &i2, value_type const &i3, value_type const &i4)
| TinyVector ()
| TinyVector (TinyVector const &r)
| TinyVector (const_pointer data)
TinyVector & | operator= (TinyVector const &r)
template<class U, class DATA, class DERIVED> | TinyVector (TinyVectorBase< U, SIZE, DATA, DERIVED > const &r)
template<class U, class DATA, class DERIVED> TinyVector & | operator= (TinyVectorBase< U, SIZE, DATA, DERIVED > const &r)

## Detailed Description

### template<class T, int SIZE>
class vigra::TinyVector< T, SIZE >

Class for fixed size vectors.

This class contains an array of size SIZE of the specified VALUETYPE. The interface conforms to STL vector, except that there are no functions that change the size of a TinyVector.

Arithmetic operations on TinyVectors are defined as component-wise applications of these operations. Addition and subtraction of two TinyVectors (+=, -=, +, -, unary -), multiplication and division of an TinyVector with a double, and NumericTraits/PromoteTraits are defined, so that TinyVector fulfills the requirements of LinearAlgebra.

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

See also:

vigra::TinyVectorBase
vigra::TinyVectorView
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[SIZE], TinyVector< T, SIZE > >. Reimplemented in RGBValue.

typedef BaseType::const_pointer const_pointer

| const pointer (return of operator-> const). Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.

typedef BaseType::const_reference const_reference

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

typedef BaseType::difference_type difference_type

| STL-compatible definition of difference_type Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.

typedef BaseType::iterator iterator

| STL-compatible definition of iterator Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >. Reimplemented in RGBValue.

typedef BaseType::NormType NormType

| the vector's norm type Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >. Reimplemented in RGBValue.

typedef BaseType::pointer pointer

| pointer (return of operator->). Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.

typedef BaseType::reference reference

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

typedef BaseType::scalar_multiplier scalar_multiplier

| the scalar type for the outer product Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.

typedef BaseType::size_type size_type

| STL-compatible definition of size_type Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >.

typedef BaseType::SquaredNormType SquaredNormType

| the vector's squared norm type Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >. Reimplemented in RGBValue.

typedef BaseType::value_type value_type

| STL-compatible definition of valuetype Reimplemented from TinyVectorBase< T, SIZE, T[SIZE], TinyVector< T, SIZE > >. Reimplemented in RGBValue.

## Constructor & Destructor Documentation

TinyVector | ( | value_type const & | initial | ) | `[inline, explicit]`

| Construction with constant value

TinyVector | ( | value_type const & | i1,
|  | value_type const & | i2
| ) | `[inline]`

| Construction with explicit values. Call only if SIZE == 2

TinyVector | ( | value_type const & | i1,
|  | value_type const & | i2,
|  | value_type const & | i3
| ) | `[inline]`

| Construction with explicit values. Call only if SIZE == 3

TinyVector | ( | value_type const & | i1,
|  | value_type const & | i2,
|  | value_type const & | i3,
|  | value_type const & | i4
| ) | `[inline]`

| Construction with explicit values. Call only if SIZE == 4

TinyVector | ( |  | ) | `[inline]`

| Default constructor (initializes all components with zero)

TinyVector | ( | TinyVector< T, SIZE > const & | r | ) | `[inline]`

| Copy constructor.

TinyVector | ( | const_pointer | data | ) | `[inline, explicit]`

| Constructor from C array.

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

| Copy with type conversion.

## Member Function Documentation

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

| Copy assignment with type conversion.

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

| Copy assignment.

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)