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

tvmet::XprUnOp< UnOp, E > Class Template Reference

#include <tvmet/xpr/UnOperator.h>

Inheritance diagram for tvmet::XprUnOp< UnOp, E >:

Inheritance graph
[legend]
Collaboration diagram for tvmet::XprUnOp< UnOp, E >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class UnOp, class E>
class tvmet::XprUnOp< UnOp, E >

Unary operator working on one subexpression.

Using the access operator() the unary operation will be evaluated.


Public Types

enum  { ops_expr = E::ops, ops = 1 * ops_expr }
 Complexity counter. More...
typedef UnOp::value_type value_type

Public Member Functions

 XprUnOp (const E &e)
 Constructor for an expressions.
value_type operator() (std::size_t i) const
 Index operator, evaluates the expression inside.
value_type operator() (std::size_t i, std::size_t j) const
 index operator for arrays/matrices.
void print_xpr (std::ostream &os, std::size_t l=0) const

Private Member Functions

 XprUnOp ()
XprUnOpoperator= (const XprUnOp &)

Private Attributes

const E m_expr


Member Typedef Documentation

template<class UnOp, class E>
typedef UnOp::value_type tvmet::XprUnOp< UnOp, E >::value_type


Member Enumeration Documentation

template<class UnOp, class E>
anonymous enum

Complexity counter.

Enumerator:
ops_expr 
ops 


Constructor & Destructor Documentation

template<class UnOp, class E>
tvmet::XprUnOp< UnOp, E >::XprUnOp (  )  [private]

template<class UnOp, class E>
tvmet::XprUnOp< UnOp, E >::XprUnOp ( const E &  e  )  [inline, explicit]

Constructor for an expressions.


Member Function Documentation

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

template<class UnOp, class E>
value_type tvmet::XprUnOp< UnOp, E >::operator() ( std::size_t  i  )  const [inline]

Index operator, evaluates the expression inside.

template<class UnOp, class E>
value_type tvmet::XprUnOp< UnOp, E >::operator() ( std::size_t  i,
std::size_t  j 
) const [inline]

index operator for arrays/matrices.

template<class UnOp, class E>
void tvmet::XprUnOp< UnOp, E >::print_xpr ( std::ostream &  os,
std::size_t  l = 0 
) const [inline]


Member Data Documentation

template<class UnOp, class E>
const E tvmet::XprUnOp< UnOp, E >::m_expr [private]


Author: