SourceForge Logo Tiny Vector Matrix library using Expression Templates Sourceforge Project Page

tvmet::AliasProxy< E > Class Template Reference

#include <tvmet/AliasProxy.h>

Collaboration diagram for tvmet::AliasProxy< E >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class E>
class tvmet::AliasProxy< E >

Assign proxy for alias Matrices and Vectors.

A short lived object to provide simplified alias syntax. Only the friend function alias is allowed to create such a object. The proxy calls the appropriate member alias_xyz() which have to use temporaries to avoid overlapping memory regions.

See also:
alias

Some Notes ... about aliasing

Note:
Thanks to ublas-dev group, where the principle idea comes from.


Public Member Functions

 AliasProxy (E &expr)
template<class E2>
E & operator= (const E2 &expr)
template<class E2>
E & operator+= (const E2 &expr)
template<class E2>
E & operator-= (const E2 &expr)
template<class E2>
E & operator *= (const E2 &expr)
template<class E2>
E & operator/= (const E2 &expr)

Private Member Functions

 AliasProxy (const AliasProxy &)
AliasProxyoperator= (const AliasProxy &)

Private Attributes

E & m_expr

Friends

AliasProxy< E > alias (E &expr)
 Simplify syntax for alias Matrices and Vectors, where aliasing left hand values appear in the expression.


Constructor & Destructor Documentation

template<class E>
tvmet::AliasProxy< E >::AliasProxy ( const AliasProxy< E > &   )  [private]

template<class E>
tvmet::AliasProxy< E >::AliasProxy ( E &  expr  )  [inline]


Member Function Documentation

template<class E>
AliasProxy& tvmet::AliasProxy< E >::operator= ( const AliasProxy< E > &   )  [private]

template<class E>
template<class E2>
E& tvmet::AliasProxy< E >::operator= ( const E2 &  expr  )  [inline]

template<class E>
template<class E2>
E& tvmet::AliasProxy< E >::operator+= ( const E2 &  expr  )  [inline]

template<class E>
template<class E2>
E& tvmet::AliasProxy< E >::operator-= ( const E2 &  expr  )  [inline]

template<class E>
template<class E2>
E& tvmet::AliasProxy< E >::operator *= ( const E2 &  expr  )  [inline]

template<class E>
template<class E2>
E& tvmet::AliasProxy< E >::operator/= ( const E2 &  expr  )  [inline]


Friends And Related Function Documentation

template<class E>
AliasProxy<E> alias ( E &  expr  )  [friend]

Simplify syntax for alias Matrices and Vectors, where aliasing left hand values appear in the expression.

Example:
 typedef tvmet::Matrix<double, 10, 10>  matrix_type;
 matrix_type          m;
 ...
 alias(m) += trans(m);
See also:
AliasProxy

Some Notes ... about aliasing


Member Data Documentation

template<class E>
E& tvmet::AliasProxy< E >::m_expr [private]


Author: