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

Namespaces | Defines | Functions
include/tvmet/xpr/MatrixFunctions.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  tvmet
 

The namespace for the Tiny Vector Matrix using Expression Templates Libary.


Defines

#define TVMET_DECLARE_MACRO(NAME)
#define TVMET_DECLARE_MACRO(NAME, POD)
#define TVMET_DECLARE_MACRO(NAME)
#define TVMET_IMPLEMENT_MACRO(NAME)
#define TVMET_IMPLEMENT_MACRO(NAME, POD)
#define TVMET_IMPLEMENT_MACRO(NAME)

Functions

 tvmet::TVMET_DECLARE_MACRO (add) TVMET_DECLARE_MACRO(sub) namespace element_wise
template<class E1 , std::size_t Rows1, std::size_t Cols1, class E2 , std::size_t Cols2>
XprMatrix< XprMMProduct
< XprMatrix< E1, Rows1, Cols1 >
, Rows1, Cols1, XprMatrix< E2,
Cols1, Cols2 >, Cols2 >, Rows1,
Cols2 > 
tvmet::prod (const XprMatrix< E1, Rows1, Cols1 > &lhs, const XprMatrix< E2, Cols1, Cols2 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Evaluate the product of two XprMatrix.
template<class E1 , std::size_t Rows1, std::size_t Cols1, class E2 , std::size_t Cols2>
XprMatrix
< XprMMProductTransposed
< XprMatrix< E1, Rows1, Cols1 >
, Rows1, Cols1, XprMatrix< E2,
Cols1, Cols2 >, Cols2 >, Cols2,
Rows1 > 
tvmet::trans_prod (const XprMatrix< E1, Rows1, Cols1 > &lhs, const XprMatrix< E2, Cols1, Cols2 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the trans(matrix-matrix-product) Perform on given Matrix M1 and M2:

\[ (M_1\,M_2)^T \]

.

template<class E1 , std::size_t Rows1, std::size_t Cols1, class E2 , std::size_t Cols2>
XprMatrix< XprMtMProduct
< XprMatrix< E1, Rows1, Cols1 >
, Rows1, Cols1, XprMatrix< E2,
Rows1, Cols2 >, Cols2 >, Cols1,
Cols2 > 
tvmet::MtM_prod (const XprMatrix< E1, Rows1, Cols1 > &lhs, const XprMatrix< E2, Rows1, Cols2 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the trans(matrix)-matrix-product.
template<class E1 , std::size_t Rows1, std::size_t Cols1, class E2 , std::size_t Rows2>
XprMatrix< XprMMtProduct
< XprMatrix< E1, Rows1, Cols1 >
, Rows1, Cols1, XprMatrix< E2,
Rows2, Cols1 >, Cols1 >, Rows1,
Rows2 > 
tvmet::MMt_prod (const XprMatrix< E1, Rows1, Cols1 > &lhs, const XprMatrix< E2, Rows2, Cols1 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the matrix-trans(matrix)-product.
template<class E1 , std::size_t Rows, std::size_t Cols, class E2 >
XprVector< XprMVProduct
< XprMatrix< E1, Rows, Cols >
, Rows, Cols, XprVector< E2,
Cols > >, Rows > 
tvmet::prod (const XprMatrix< E1, Rows, Cols > &lhs, const XprVector< E2, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
 Evaluate the product of XprMatrix and XprVector.
template<class E , std::size_t Rows, std::size_t Cols>
XprMatrix< XprMatrixTranspose
< XprMatrix< E, Rows, Cols >
>, Cols, Rows > 
tvmet::trans (const XprMatrix< E, Rows, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
 Transpose an expression matrix.
template<class E , std::size_t Sz>
NumericTraits< typename
E::value_type >::sum_type 
tvmet::trace (const XprMatrix< E, Sz, Sz > &m) TVMET_CXX_ALWAYS_INLINE
template<class E , std::size_t Rows, std::size_t Cols>
XprVector< XprMatrixRow
< XprMatrix< E, Rows, Cols >
, Rows, Cols >, Cols > 
tvmet::row (const XprMatrix< E, Rows, Cols > &m, std::size_t no) TVMET_CXX_ALWAYS_INLINE
 Returns a row vector of the given matrix.
template<class E , std::size_t Rows, std::size_t Cols>
XprVector< XprMatrixCol
< XprMatrix< E, Rows, Cols >
, Rows, Cols >, Rows > 
tvmet::col (const XprMatrix< E, Rows, Cols > &m, std::size_t no) TVMET_CXX_ALWAYS_INLINE
 Returns a column vector of the given matrix.
template<class E , std::size_t Sz>
XprVector< XprMatrixDiag
< XprMatrix< E, Sz, Sz >, Sz >
, Sz > 
tvmet::diag (const XprMatrix< E, Sz, Sz > &m) TVMET_CXX_ALWAYS_INLINE
 Returns the diagonal vector of the given square matrix.
 tvmet::TVMET_IMPLEMENT_MACRO (add) TVMET_IMPLEMENT_MACRO(sub) namespace element_wise

Define Documentation

#define TVMET_DECLARE_MACRO (   NAME)
Value:
template<class E1, class E2, std::size_t Rows, std::size_t Cols>  \
XprMatrix<                \
  XprBinOp<               \
    Fcnl_##NAME<typename E1::value_type, typename E2::value_type>,  \
    XprMatrix<E1, Rows, Cols>,            \
    XprMatrix<E2, Rows, Cols>           \
  >,                  \
  Rows, Cols                \
>                 \
NAME (const XprMatrix<E1, Rows, Cols>& lhs,       \
      const XprMatrix<E2, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO (   NAME,
  POD 
)
Value:
template<class E, std::size_t Rows, std::size_t Cols>     \
XprMatrix<                \
  XprBinOp<               \
    Fcnl_##NAME<typename E::value_type, POD >,        \
    XprMatrix<E, Rows, Cols>,           \
    XprLiteral< POD >             \
  >,                  \
  Rows, Cols                \
>                 \
NAME (const XprMatrix<E, Rows, Cols>& lhs,        \
      POD rhs) TVMET_CXX_ALWAYS_INLINE;         \
                  \
template<class E, std::size_t Rows, std::size_t Cols>     \
XprMatrix<                \
  XprBinOp<               \
    Fcnl_##NAME< POD, typename E::value_type>,        \
    XprLiteral< POD >,              \
    XprMatrix<E, Rows, Cols>            \
  >,                  \
  Rows, Cols                \
>                 \
NAME (POD lhs,                \
      const XprMatrix<E, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO (   NAME)
Value:
template<class E, class T, std::size_t Rows, std::size_t Cols>    \
XprMatrix<                \
  XprBinOp<               \
    Fcnl_##NAME<typename E::value_type, std::complex<T> >,    \
    XprMatrix<E, Rows, Cols>,           \
    XprLiteral< std::complex<T> >         \
  >,                  \
  Rows, Cols                \
>                 \
NAME (const XprMatrix<E, Rows, Cols>& lhs,        \
      const std::complex<T>& rhs) TVMET_CXX_ALWAYS_INLINE;    \
                  \
template<class T, class E, std::size_t Rows, std::size_t Cols>    \
XprMatrix<                \
  XprBinOp<               \
    Fcnl_##NAME< std::complex<T>, typename E::value_type>,    \
    XprLiteral< std::complex<T> >,          \
    XprMatrix<E, Rows, Cols>            \
  >,                  \
  Rows, Cols                \
>                 \
NAME (const std::complex<T>& lhs,         \
      const XprMatrix<E, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_IMPLEMENT_MACRO (   NAME)
Value:
template<class E1, class E2, std::size_t Rows, std::size_t Cols>  \
inline                  \
XprMatrix<                \
  XprBinOp<               \
    Fcnl_##NAME<typename E1::value_type, typename E2::value_type>,  \
    XprMatrix<E1, Rows, Cols>,            \
    XprMatrix<E2, Rows, Cols>           \
  >,                  \
  Rows, Cols                \
>                 \
NAME (const XprMatrix<E1, Rows, Cols>& lhs,         \
      const XprMatrix<E2, Rows, Cols>& rhs) {       \
  typedef XprBinOp<             \
    Fcnl_##NAME<typename E1::value_type, typename E2::value_type>,  \
    XprMatrix<E1, Rows, Cols>,            \
    XprMatrix<E2, Rows, Cols>           \
  >                expr_type; \
  return XprMatrix<expr_type, Rows, Cols>(expr_type(lhs, rhs));   \
}
#define TVMET_IMPLEMENT_MACRO (   NAME,
  POD 
)
#define TVMET_IMPLEMENT_MACRO (   NAME)
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines

Author: