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

Namespaces | Defines | Functions
include/tvmet/MatrixFunctions.h File Reference
#include <tvmet/Extremum.h>
Include dependency graph for MatrixFunctions.h:
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 T1 , std::size_t Rows1, std::size_t Cols1, class T2 , std::size_t Cols2>
XprMatrix< XprMMProduct
< MatrixConstReference< T1,
Rows1, Cols1 >, Rows1, Cols1,
MatrixConstReference< T2,
Cols1, Cols2 >, Cols2 >, Rows1,
Cols2 > 
tvmet::prod (const Matrix< T1, Rows1, Cols1 > &lhs, const Matrix< T2, Cols1, Cols2 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the matrix-matrix-product.
template<class E1 , std::size_t Rows1, std::size_t Cols1, class T2 , std::size_t Cols2>
XprMatrix< XprMMProduct
< XprMatrix< E1, Rows1, Cols1 >
, Rows1, Cols1,
MatrixConstReference< T2,
Cols1, Cols2 >, Cols2 >, Rows1,
Cols2 > 
tvmet::prod (const XprMatrix< E1, Rows1, Cols1 > &lhs, const Matrix< T2, Cols1, Cols2 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Evaluate the product of XprMatrix and Matrix.
template<class T1 , std::size_t Rows1, std::size_t Cols1, class E2 , std::size_t Cols2>
XprMatrix< XprMMProduct
< MatrixConstReference< T1,
Rows1, Cols1 >, Rows1, Cols1,
XprMatrix< E2, Cols1, Cols2 >
, Cols2 >, Rows1, Cols2 > 
tvmet::prod (const Matrix< T1, Rows1, Cols1 > &lhs, const XprMatrix< E2, Cols1, Cols2 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Evaluate the product of Matrix and XprMatrix.
template<class T1 , std::size_t Rows1, std::size_t Cols1, class T2 , std::size_t Cols2>
XprMatrix
< XprMMProductTransposed
< MatrixConstReference< T1,
Rows1, Cols1 >, Rows1, Cols1,
MatrixConstReference< T2,
Cols1, Cols2 >, Cols2 >, Cols2,
Rows1 > 
tvmet::trans_prod (const Matrix< T1, Rows1, Cols1 > &lhs, const Matrix< T2, 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 T1 , std::size_t Rows1, std::size_t Cols1, class T2 , std::size_t Cols2>
XprMatrix< XprMtMProduct
< MatrixConstReference< T1,
Rows1, Cols1 >, Rows1, Cols1,
MatrixConstReference< T2,
Rows1, Cols2 >, Cols2 >, Cols1,
Cols2 > 
tvmet::MtM_prod (const Matrix< T1, Rows1, Cols1 > &lhs, const Matrix< T2, Rows1, Cols2 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the trans(matrix)-matrix-product.
template<class T1 , std::size_t Rows1, std::size_t Cols1, class T2 , std::size_t Rows2>
XprMatrix< XprMMtProduct
< MatrixConstReference< T1,
Rows1, Cols1 >, Rows1, Cols1,
MatrixConstReference< T2,
Rows2, Cols1 >, Cols1 >, Rows1,
Rows2 > 
tvmet::MMt_prod (const Matrix< T1, Rows1, Cols1 > &lhs, const Matrix< T2, Rows2, Cols1 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the matrix-trans(matrix)-product.
template<class T1 , class T2 , std::size_t Rows, std::size_t Cols>
XprVector< XprMVProduct
< MatrixConstReference< T1,
Rows, Cols >, Rows, Cols,
VectorConstReference< T2, Cols >
>, Rows > 
tvmet::prod (const Matrix< T1, Rows, Cols > &lhs, const Vector< T2, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the matrix-vector-product.
template<class T1 , class E2 , std::size_t Rows, std::size_t Cols>
XprVector< XprMVProduct
< MatrixConstReference< T1,
Rows, Cols >, Rows, Cols,
XprVector< E2, Cols > >, Rows > 
tvmet::prod (const Matrix< T1, Rows, Cols > &lhs, const XprVector< E2, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the matrix-vector-product.
template<class E1 , class T2 , std::size_t Rows, std::size_t Cols>
XprVector< XprMVProduct
< XprMatrix< E1, Rows, Cols >
, Rows, Cols,
VectorConstReference< T2, Cols >
>, Rows > 
tvmet::prod (const XprMatrix< E1, Rows, Cols > &lhs, const Vector< T2, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
template<class T1 , class T2 , std::size_t Rows, std::size_t Cols>
XprVector< XprMtVProduct
< MatrixConstReference< T1,
Rows, Cols >, Rows, Cols,
VectorConstReference< T2, Rows >
>, Cols > 
tvmet::Mtx_prod (const Matrix< T1, Rows, Cols > &lhs, const Vector< T2, Rows > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the trans(matrix)-vector-productPerform on given Matrix M and vector x:

\[ M^T\, x \]

.

template<class T , std::size_t Rows, std::size_t Cols>
XprMatrix< XprMatrixTranspose
< MatrixConstReference< T,
Rows, Cols > >, Cols, Rows > 
tvmet::trans (const Matrix< T, Rows, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
 Transpose the matrix.
template<class T , std::size_t Sz>
NumericTraits< T >::sum_type tvmet::trace (const Matrix< T, Sz, Sz > &m) TVMET_CXX_ALWAYS_INLINE
template<class T , std::size_t Rows, std::size_t Cols>
XprVector< XprMatrixRow
< MatrixConstReference< T,
Rows, Cols >, Rows, Cols >
, Cols > 
tvmet::row (const Matrix< T, Rows, Cols > &m, std::size_t no) TVMET_CXX_ALWAYS_INLINE
 Returns a row vector of the given matrix.
template<class T , std::size_t Rows, std::size_t Cols>
XprVector< XprMatrixCol
< MatrixConstReference< T,
Rows, Cols >, Rows, Cols >
, Rows > 
tvmet::col (const Matrix< T, Rows, Cols > &m, std::size_t no) TVMET_CXX_ALWAYS_INLINE
 Returns a column vector of the given matrix.
template<class T , std::size_t Sz>
XprVector< XprMatrixDiag
< MatrixConstReference< T, Sz,
Sz >, Sz >, Sz > 
tvmet::diag (const Matrix< T, Sz, Sz > &m) TVMET_CXX_ALWAYS_INLINE
 Returns the diagonal vector of the given square matrix.
template<class E , std::size_t Rows, std::size_t Cols>
Extremum< typename
E::value_type, std::size_t,
matrix_tag > 
tvmet::maximum (const XprMatrix< E, Rows, Cols > &e)
 Find the maximum of a matrix expression.
template<class T , std::size_t Rows, std::size_t Cols>
Extremum< T, std::size_t,
matrix_tag > 
tvmet::maximum (const Matrix< T, Rows, Cols > &m) TVMET_CXX_ALWAYS_INLINE
 Find the maximum of a matrix.
template<class E , std::size_t Rows, std::size_t Cols>
Extremum< typename
E::value_type, std::size_t,
matrix_tag > 
tvmet::minimum (const XprMatrix< E, Rows, Cols > &e)
 Find the minimum of a matrix expression.
template<class T , std::size_t Rows, std::size_t Cols>
Extremum< T, std::size_t,
matrix_tag > 
tvmet::minimum (const Matrix< T, Rows, Cols > &m) TVMET_CXX_ALWAYS_INLINE
 Find the minimum of a matrix.
template<class E , std::size_t Rows, std::size_t Cols>
E::value_type tvmet::max (const XprMatrix< E, Rows, Cols > &e)
 Find the maximum of a matrix expression.
template<class T , std::size_t Rows, std::size_t Cols>
tvmet::max (const Matrix< T, Rows, Cols > &m) TVMET_CXX_ALWAYS_INLINE
 Find the maximum of a matrix.
template<class E , std::size_t Rows, std::size_t Cols>
E::value_type tvmet::min (const XprMatrix< E, Rows, Cols > &e)
 Find the minimum of a matrix expression.
template<class T , std::size_t Rows, std::size_t Cols>
tvmet::min (const Matrix< T, Rows, Cols > &m) TVMET_CXX_ALWAYS_INLINE
 Find the minimum of a matrix.
template<class T , std::size_t Rows, std::size_t Cols>
XprMatrix< XprIdentity< T,
Rows, Cols >, Rows, Cols > 
tvmet::identity () TVMET_CXX_ALWAYS_INLINE
 Fill a matrix to an identity matrix.
template<class M >
XprMatrix< XprIdentity
< typename M::value_type,
M::Rows, M::Cols >, M::Rows,
M::Cols > 
tvmet::identity () TVMET_CXX_ALWAYS_INLINE
template<class T , std::size_t Rows, std::size_t Cols>
XprMatrix
< MatrixConstReference< T,
Rows, Cols >, Rows, Cols > 
tvmet::cmatrix_ref (const T *mem) TVMET_CXX_ALWAYS_INLINE
 Creates an expression wrapper for a C like matrices.
 tvmet::TVMET_IMPLEMENT_MACRO (add) TVMET_IMPLEMENT_MACRO(sub) namespace element_wise

Define Documentation

#define TVMET_DECLARE_MACRO (   NAME)
#define TVMET_DECLARE_MACRO (   NAME,
  POD 
)
Value:
template<class T, std::size_t Rows, std::size_t Cols>     \
XprMatrix<                \
  XprBinOp<               \
    Fcnl_##NAME<T, POD >,           \
    MatrixConstReference<T, Rows, Cols>,        \
    XprLiteral<POD >              \
  >,                  \
  Rows, Cols                \
>                 \
NAME (const Matrix<T, Rows, Cols>& lhs,         \
      POD rhs) TVMET_CXX_ALWAYS_INLINE;         \
                  \
template<class T, std::size_t Rows, std::size_t Cols>     \
XprMatrix<                \
  XprBinOp<               \
    Fcnl_##NAME< POD, T>,           \
    XprLiteral< POD >,              \
    MatrixConstReference<T, Rows, Cols>         \
  >,                  \
  Rows, Cols                \
>                 \
NAME (POD lhs,                \
      const Matrix<T, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO (   NAME)
Value:
template<class T, std::size_t Rows, std::size_t Cols>       \
XprMatrix<                  \
  XprBinOp<                 \
    Fcnl_##NAME< std::complex<T>, std::complex<T> >,        \
    MatrixConstReference< std::complex<T>, Rows, Cols>,       \
    XprLiteral<std::complex<T> >            \
  >,                    \
  Rows, Cols                  \
>                   \
NAME (const Matrix< std::complex<T>, Rows, Cols>& lhs,        \
      const std::complex<T>& rhs) TVMET_CXX_ALWAYS_INLINE;      \
                    \
template<class T, std::size_t Rows, std::size_t Cols>       \
XprMatrix<                  \
  XprBinOp<                 \
    Fcnl_##NAME< std::complex<T>, std::complex<T> >,        \
    XprLiteral< std::complex<T> >,            \
    MatrixConstReference< std::complex<T>, Rows, Cols>        \
  >,                    \
  Rows, Cols                  \
>                   \
NAME (const std::complex<T>& lhs,           \
      const Matrix< std::complex<T>, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_IMPLEMENT_MACRO (   NAME)
#define TVMET_IMPLEMENT_MACRO (   NAME,
  POD 
)
#define TVMET_IMPLEMENT_MACRO (   NAME)
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines

Author: