Tiny Vector Matrix library using Expression Templates | Sourceforge Project Page |
#include <tvmet/xpr/Vector.h>
Inheritance diagram for tvmet::XprVector< E, Sz >:
Specifically, XprVector is the class that wraps the expression, and the expression itself is represented by the template parameter E. The class XprVector is known as an anonymizing expression wrapper because it can hold any subexpression of arbitrary complexity, allowing clients to work with any expression by holding on to it via the wrapper, without having to know the name of the type object that actually implements the expression.
Public Types | |
enum | { Size = Sz } |
Dimensions. More... | |
enum | { ops_assign = Size, ops = E::ops, use_meta = ops_assign < TVMET_COMPLEXITY_V_ASSIGN_TRIGGER ? true : false } |
Complexity counter. More... | |
typedef E::value_type | value_type |
Public Member Functions | |
XprVector (const E &e) | |
Constructor. | |
value_type | operator() (std::size_t i) const |
const index operator for vectors. | |
value_type | operator[] (std::size_t i) const |
const index operator for vectors. | |
template<class Dest, class Assign> | |
void | assign_to (Dest &dest, const Assign &assign_fn) const |
assign this expression to Vector dest. | |
void | print_xpr (std::ostream &os, std::size_t l=0) const |
Private Member Functions | |
XprVector () | |
XprVector & | operator= (const XprVector &) |
Static Private Member Functions | |
template<class Dest, class Src, class Assign> | |
static void | do_assign (dispatch< true >, Dest &dest, const Src &src, const Assign &assign_fn) |
Wrapper for meta assign. | |
template<class Dest, class Src, class Assign> | |
static void | do_assign (dispatch< false >, Dest &dest, const Src &src, const Assign &assign_fn) |
Wrapper for loop assign. | |
Private Attributes | |
const E | m_expr |
typedef E::value_type tvmet::XprVector< E, Sz >::value_type |
anonymous enum |
anonymous enum |
tvmet::XprVector< E, Sz >::XprVector | ( | ) | [private] |
tvmet::XprVector< E, Sz >::XprVector | ( | const E & | e | ) | [inline, explicit] |
Constructor.
XprVector& tvmet::XprVector< E, Sz >::operator= | ( | const XprVector< E, Sz > & | ) | [private] |
value_type tvmet::XprVector< E, Sz >::operator() | ( | std::size_t | i | ) | const [inline] |
const index operator for vectors.
value_type tvmet::XprVector< E, Sz >::operator[] | ( | std::size_t | i | ) | const [inline] |
const index operator for vectors.
static void tvmet::XprVector< E, Sz >::do_assign | ( | dispatch< true > | , | |
Dest & | dest, | |||
const Src & | src, | |||
const Assign & | assign_fn | |||
) | [inline, static, private] |
Wrapper for meta assign.
static void tvmet::XprVector< E, Sz >::do_assign | ( | dispatch< false > | , | |
Dest & | dest, | |||
const Src & | src, | |||
const Assign & | assign_fn | |||
) | [inline, static, private] |
Wrapper for loop assign.
void tvmet::XprVector< E, Sz >::assign_to | ( | Dest & | dest, | |
const Assign & | assign_fn | |||
) | const [inline] |
assign this expression to Vector dest.
void tvmet::XprVector< E, Sz >::print_xpr | ( | std::ostream & | os, | |
std::size_t | l = 0 | |||
) | const [inline] |
const E tvmet::XprVector< E, Sz >::m_expr [private] |
Author: |