|
Tiny Vector Matrix library using Expression Templates | Sourceforge Project Page |
Represents the expression for vectors at any node in the parse tree. More...
#include <tvmet/xpr/Matrix.h>
Public Types | |
enum | { Rows = NRows, Cols = NCols, Size = Rows * Cols } |
Dimensions. More... | |
enum | { ops_assign = Rows * Cols, ops = E::ops, use_meta = ops_assign < TVMET_COMPLEXITY_M_ASSIGN_TRIGGER ? true : false } |
Complexity counter. More... | |
typedef E::value_type | value_type |
Public Member Functions | |
XprMatrix (const E &e) | |
Constructor. | |
value_type | operator() (std::size_t i, std::size_t j) const |
Copy Constructor. | |
template<class Dest , class Assign > | |
void | assign_to (Dest &dest, const Assign &assign_fn) const |
assign this expression to Matrix dest. | |
void | print_xpr (std::ostream &os, std::size_t l=0) const |
Private Member Functions | |
XprMatrix () | |
XprMatrix & | operator= (const XprMatrix &) |
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 |
Represents the expression for vectors at any node in the parse tree.
Specifically, XprMatrix is the class that wraps the expression, and the expression itself is represented by the template parameter E. The class XprMatrix 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.
typedef E::value_type tvmet::XprMatrix< E, NRows, NCols >::value_type |
anonymous enum |
Dimensions.
Rows |
Number of rows. |
Cols |
Number of cols. |
Size |
Complete Size of Matrix. |
anonymous enum |
tvmet::XprMatrix< E, NRows, NCols >::XprMatrix | ( | ) | [private] |
tvmet::XprMatrix< E, NRows, NCols >::XprMatrix | ( | const E & | e | ) | [inline, explicit] |
Constructor.
void tvmet::XprMatrix< E, NRows, NCols >::assign_to | ( | Dest & | dest, |
const Assign & | assign_fn | ||
) | const [inline] |
assign this expression to Matrix dest.
References tvmet::XprMatrix< E, NRows, NCols >::do_assign().
Referenced by tvmet::Matrix< T, NRows, NCols >::operator=().
static void tvmet::XprMatrix< E, NRows, NCols >::do_assign | ( | dispatch< true > | , |
Dest & | dest, | ||
const Src & | src, | ||
const Assign & | assign_fn | ||
) | [inline, static, private] |
Wrapper for meta assign.
Referenced by tvmet::XprMatrix< E, NRows, NCols >::assign_to().
static void tvmet::XprMatrix< E, NRows, NCols >::do_assign | ( | dispatch< false > | , |
Dest & | dest, | ||
const Src & | src, | ||
const Assign & | assign_fn | ||
) | [inline, static, private] |
Wrapper for loop assign.
value_type tvmet::XprMatrix< E, NRows, NCols >::operator() | ( | std::size_t | i, |
std::size_t | j | ||
) | const [inline] |
Copy Constructor.
Not explicit! access by index.
References tvmet::XprMatrix< E, NRows, NCols >::Cols, tvmet::XprMatrix< E, NRows, NCols >::m_expr, tvmet::XprMatrix< E, NRows, NCols >::Rows, and TVMET_RT_CONDITION.
XprMatrix& tvmet::XprMatrix< E, NRows, NCols >::operator= | ( | const XprMatrix< E, NRows, NCols > & | ) | [private] |
void tvmet::XprMatrix< E, NRows, NCols >::print_xpr | ( | std::ostream & | os, |
std::size_t | l = 0 |
||
) | const [inline] |
const E tvmet::XprMatrix< E, NRows, NCols >::m_expr [private] |
Author: |