[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
TinyVectorView< T, SIZE > Class Template Reference |
Wrapper for fixed size vectors. More...
#include <vigra/tinyvector.hxx>
Public Member Functions | |
TinyVectorView & | operator= (TinyVectorView const &r) |
template<class U , class DATA , class DERIVED > | |
TinyVectorView & | operator= (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_type * | iterator |
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. | |
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
TinyVectorView | ( | ) |
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.
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.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|