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

| Functions for TinyVector |

Implement basic arithmetic and equality for TinyVector. More...

## Functions

template<class V , int SIZE, class D1 , class D2 >
TinyVector< V, SIZE > | abs (TinyVectorBase< V, SIZE, D1, D2 > const &v)
| component-wise absolute value
template<class V , int SIZE, class D1 , class D2 >
TinyVector< V, SIZE > | ceil (TinyVectorBase< V, SIZE, D1, D2 > const &v)
template<class V1 , class D1 , class D2 , class V2 , class D3 , class D4 >
TinyVector< typename PromoteTraits< V1, V2 > ::Promote, 3 > | cross (TinyVectorBase< V1, 3, D1, D2 > const &r1, TinyVectorBase< V2, 3, D3, D4 > const &r2)
| cross product
template<class V , int SIZE, class D1 , class D2 >
TinyVector< typename NumericTraits< V >::Promote, SIZE > | cumprod (TinyVectorBase< V, SIZE, D1, D2 > const &l)
| cumulative product of the vector's elements
template<class V , int SIZE, class D1 , class D2 >
TinyVector< typename NumericTraits< V >::Promote, SIZE > | cumsum (TinyVectorBase< V, SIZE, D1, D2 > const &l)
| cumulative sum of the vector's elements
template<class V , int SIZE, class D1 , class D2 >
TinyVector< V, SIZE > | div (TinyVectorBase< V, SIZE, D1, D2 > const &l, V v)
| component-wise scalar division without type promotion
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
PromoteTraits< V1, V2 >::Promote | dot (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| dot product
template<class V , int SIZE, class D1 , class D2 >
TinyVector< V, SIZE > | floor (TinyVectorBase< V, SIZE, D1, D2 > const &v)
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
TinyVector< typename PromoteTraits< V1, V2 > ::Promote, SIZE > | max (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| element-wise maximum
template<class V , int SIZE, class D1 , class D2 >
V const & | max (TinyVectorBase< V, SIZE, D1, D2 > const &l)
| maximum element
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
TinyVector< typename PromoteTraits< V1, V2 > ::Promote, SIZE > | min (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| element-wise minimum
template<class V , int SIZE, class D1 , class D2 >
V const & | min (TinyVectorBase< V, SIZE, D1, D2 > const &l)
| minimum element
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
bool | operator!= (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| component-wise not equal
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator* (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| component-wise multiplication
template<class V , int SIZE, class D1 , class D2 >
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator* (double v, TinyVectorBase< V, SIZE, D1, D2 > const &r)
| component-wise left scalar multiplication
template<class V , int SIZE, class D1 , class D2 >
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator* (TinyVectorBase< V, SIZE, D1, D2 > const &l, double v)
| component-wise right scalar multiplication
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator+ (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| component-wise addition
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator- (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| component-wise subtraction
template<class V , int SIZE, class D1 , class D2 >
TinyVector< V, SIZE > | operator- (TinyVectorBase< V, SIZE, D1, D2 > const &v)
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
PromoteTraits< TinyVector< V1, SIZE >, TinyVector< V2, SIZE > >::Promote | operator/ (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| component-wise division
template<class V , int SIZE, class D1 , class D2 >
NumericTraits< TinyVector< V, SIZE > >::RealPromote | operator/ (TinyVectorBase< V, SIZE, D1, D2 > const &l, double v)
| component-wise scalar division
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
bool | operator< (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| component-wise lexicographical comparison
template<class V1 , int SIZE, class DATA , class DERIVED >
std::ostream & | operator<< (std::ostream &out, TinyVectorBase< V1, SIZE, DATA, DERIVED > const &l)
| stream output
template<class V1 , int SIZE, class D1 , class D2 , class V2 , class D3 , class D4 >
bool | operator== (TinyVectorBase< V1, SIZE, D1, D2 > const &l, TinyVectorBase< V2, SIZE, D3, D4 > const &r)
| component-wise equal
template<class V , int SIZE, class D1 , class D2 , class E >
TinyVector< V, SIZE > | pow (TinyVectorBase< V, SIZE, D1, D2 > const &v, E exponent)
template<class V , int SIZE, class D1 , class D2 >
NumericTraits< V >::Promote | prod (TinyVectorBase< V, SIZE, D1, D2 > const &l)
| product of the vector's elements
template<class V , int SIZE, class D1 , class D2 >
TinyVector< V, SIZE > | sqrt (TinyVectorBase< V, SIZE, D1, D2 > const &v)
template<class V1 , int SIZE, class D1 , class D2 >
TinyVectorBase< V1, SIZE, D1, D2 >::SquaredNormType | squaredNorm (TinyVectorBase< V1, SIZE, D1, D2 > const &t)
| squared norm
template<class V , int SIZE>
TinyVector< V, SIZE > ::SquaredNormType | squaredNorm (TinyVector< V, SIZE > const &t)
| squared norm
template<class V , int SIZE, class D1 , class D2 >
NumericTraits< V >::Promote | sum (TinyVectorBase< V, SIZE, D1, D2 > const &l)
| sum of the vector's elements

## Detailed Description

Implement basic arithmetic and equality for TinyVector.

These functions fulfill the requirements of a Linear Space (vector space). Return types are determined according to Numeric and Promote Traits of TinyVector.

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

## Function Documentation

TinyVector<V, SIZE> vigra::operator- | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |

Unary negation (construct TinyVector with negative values)

TinyVector<V, SIZE> vigra::ceil | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |

Apply ceil() function to each vector component.

TinyVector<V, SIZE> vigra::floor | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |

Apply floor() function to each vector component.

TinyVector<V, SIZE> vigra::sqrt | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v | ) |

Apply sqrt() function to each vector component.

TinyVector<V, SIZE> vigra::pow | ( | TinyVectorBase< V, SIZE, D1, D2 > const & | v,
|  | E | exponent
| ) |  |

Apply pow() function to each vector component.

© 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.9.0 (Tue Nov 6 2012)