ICRS Eurobot 2013

Dependencies:   mbed mbed-rtos Servo QEI

Embed: (wiki syntax)

« Back to documentation index

tvmet Namespace Reference

tvmet Namespace Reference

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

Namespaces

namespace  element_wise
 

Operators inside this namespace does elementwise operations.


namespace  loop
 

Loop stuff inside here.


namespace  meta
 

Meta stuff inside here.


namespace  util
 

Miscellaneous utility functions used.


Data Structures

class  AliasProxy
 Assign proxy for alias Matrices and Vectors. More...
class  Fcnl_assign
 Binary operator for assign operations. More...
class  Fcnl_polar
 Functional for polar. More...
class  Fcnl_swap
 Binary operator for swapping values using temporaries. More...
class  CommaInitializer
 Initialize classes using a comma separated lists. More...
class  matrix_tag
 For use with Extremum to simplify max handling. More...
class  vector_tag
 For use with Extremum to simplify max handling. More...
class  Extremum
 Generell class for storing extremums determined by min/max. More...
class  Functional
 Base class for all binary und unary functionals. More...
class  BinaryFunctional
 Base class for all binary functions. More...
class  UnaryFunctional
 Base class for all unary functions. More...
class  IoPrintHelper
 Determines the number of digits regarding the sign of the container. More...
class  MatrixConstReference
 value iterator for ET More...
class  Matrix
 A tiny matrix class. More...
class  NumericTraits
 Traits for integral types for operations. More...
class  TvmetBase
 Base class Used for static polymorph call of print_xpr. More...
class  IndentLevel
 Prints the level indent. More...
class  PrecisionTraits
 Declaring ranks of types to avoid specializing. More...
class  PromoteTraits
 Promote type traits. More...
class  Fcnl_conj
 > UnaryFunctionals.h "tvmet/UnaryFunctionals.h" More...
class  VectorConstReference
 Const value iterator for ET. More...
class  Vector
 Compile time fixed length vector with evaluation on compile time. More...
class  XprBinOp
 Binary operators working on two sub expressions. More...
class  XprEval
 evaluate the expression More...
class  XprIdentity
 Expression for the identity matrix. More...
class  XprLiteral
 Specify literals like scalars into the expression. More...
class  XprMatrix
 Represents the expression for vectors at any node in the parse tree. More...
class  XprMatrixCol
 Expression on matrix used for access on the column vector. More...
class  XprMatrixDiag
 Expression on matrix used for access on the diagonal vector. More...
class  XprMatrixRow
 Expression on matrix used for access on the row vector. More...
class  XprMatrixTranspose
 Expression for transpose matrix. More...
class  XprMMProduct
 Expression for matrix-matrix product. More...
class  XprMMProductTransposed
 Expression for transpose(matrix-matrix product). More...
class  XprMMtProduct
 Expression for matrix-matrix product. More...
class  XprMtMProduct
 Expression for product of transposed(matrix)-matrix product. More...
class  XprMtVProduct
 Expression for matrix-transposed vector product using formula

\[ M^T\,v \]

. More...

class  XprMVProduct
 Expression for matrix-vector product using formula

\[ M\,v \]

. More...

class  XprNull
 Null object design pattern. More...
class  XprUnOp
 Unary operator working on one subexpression. More...
class  XprVector
 Represents the expression for vectors at any node in the parse tree. More...

Functions

template<class E >
AliasProxy< E > alias (E &expr)
 Simplify syntax for alias Matrices and Vectors, where aliasing left hand values appear in the expression.
template<class E , std::size_t Rows, std::size_t Cols>
bool all_elements (const XprMatrix< E, Rows, Cols > &e)
 check on statements for all elementsThis is for use with boolean operators like
template<class E , std::size_t Rows, std::size_t Cols>
bool any_elements (const XprMatrix< E, Rows, Cols > &e)
 check on statements for any elementsThis is for use with boolean operators like
template<class E1 , class T2 , class T3 , std::size_t Rows, std::size_t Cols>
XprMatrix< XprEval< XprMatrix
< E1, Rows, Cols >
, MatrixConstReference< T2,
Rows, Cols >
, MatrixConstReference< T3,
Rows, Cols > >, Rows, Cols > 
eval (const XprMatrix< E1, Rows, Cols > &e1, const Matrix< T2, Rows, Cols > &m2, const Matrix< T3, Rows, Cols > &m3)
 Evals the matrix expressions.
template<class E1 , class T2 , class E3 , std::size_t Rows, std::size_t Cols>
XprMatrix< XprEval< XprMatrix
< E1, Rows, Cols >
, MatrixConstReference< T2,
Rows, Cols >, XprMatrix< E3,
Rows, Cols > >, Rows, Cols > 
eval (const XprMatrix< E1, Rows, Cols > &e1, const Matrix< T2, Rows, Cols > &m2, const XprMatrix< E3, Rows, Cols > &e3)
 Evals the matrix expressions.
template<class E1 , class E2 , class T3 , std::size_t Rows, std::size_t Cols>
XprMatrix< XprEval< XprMatrix
< E1, Rows, Cols >, XprMatrix
< E2, Rows, Cols >
, MatrixConstReference< T3,
Rows, Cols > >, Rows, Cols > 
eval (const XprMatrix< E1, Rows, Cols > &e1, const XprMatrix< E2, Rows, Cols > &e2, const Matrix< T3, Rows, Cols > &m3)
 Evals the matrix expressions.
template<class E1 , class E2 , class E3 , std::size_t Rows, std::size_t Cols>
XprMatrix< XprEval< XprMatrix
< E1, Rows, Cols >, XprMatrix
< E2, Rows, Cols >, XprMatrix
< E3, Rows, Cols > >, Rows,
Cols > 
eval (const XprMatrix< E1, Rows, Cols > &e1, const XprMatrix< E2, Rows, Cols > &e2, const XprMatrix< E3, Rows, Cols > &e3)
 Evals the matrix expressions.
template<class E1 , class E3 , std::size_t Rows, std::size_t Cols, class T >
XprMatrix< XprEval< XprMatrix
< E1, Rows, Cols >, XprLiteral
< std::complex< T >
>, XprMatrix< E3, Rows, Cols >
>, Rows, Cols > 
eval (const XprMatrix< E1, Rows, Cols > &e1, const std::complex< T > &x2, const XprMatrix< E3, Rows, Cols > &e3)
 Evals the matrix expressions.
template<class E1 , class E2 , std::size_t Rows, std::size_t Cols, class T >
XprMatrix< XprEval< XprMatrix
< E1, Rows, Cols >, XprMatrix
< E2, Rows, Cols >, XprLiteral
< std::complex< T > > >, Rows,
Cols > 
eval (const XprMatrix< E1, Rows, Cols > &e1, const XprMatrix< E2, Rows, Cols > &e2, const std::complex< T > &x3)
 Evals the matrix expressions.
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 > 
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 > 
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 > 
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 > 
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 > 
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 > 
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 > 
prod (const Matrix< T1, Rows, Cols > &lhs, const XprVector< E2, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
 Function for the matrix-vector-product.
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 > 
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 > 
trans (const Matrix< T, Rows, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
 Transpose the matrix.
template<class T , std::size_t Rows, std::size_t Cols>
XprVector< XprMatrixRow
< MatrixConstReference< T,
Rows, Cols >, Rows, Cols >
, Cols > 
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 > 
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 > 
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
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
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
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
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 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>
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 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>
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 > 
identity () TVMET_CXX_ALWAYS_INLINE
 Fill a matrix to an identity matrix.
template<class T , std::size_t Rows, std::size_t Cols>
XprMatrix
< MatrixConstReference< T,
Rows, Cols >, Rows, Cols > 
cmatrix_ref (const T *mem) TVMET_CXX_ALWAYS_INLINE
 Creates an expression wrapper for a C like matrices.
template<class E >
std::ostream & operator<< (std::ostream &os, const TvmetBase< E > &e)
 overloaded ostream operator using static polymorphic.
template<class E , std::size_t Sz>
bool all_elements (const XprVector< E, Sz > &e)
 check on statements for all elementsThis is for use with boolean operators like
template<class E , std::size_t Sz>
bool any_elements (const XprVector< E, Sz > &e)
 check on statements for any elementsThis is for use with boolean operators like
template<class E1 , class T2 , class T3 , std::size_t Sz>
XprVector< XprEval< XprVector
< E1, Sz >
, VectorConstReference< T2, Sz >
, VectorConstReference< T3, Sz >
>, Sz > 
eval (const XprVector< E1, Sz > &e1, const Vector< T2, Sz > &v2, const Vector< T3, Sz > &v3)
 eval(const XprVector<E1, Sz>& e1, const Vector<T2, Sz>& v2, const Vector<T3, Sz>& v3)
template<class E1 , class T2 , class E3 , std::size_t Sz>
XprVector< XprEval< XprVector
< E1, Sz >
, VectorConstReference< T2, Sz >
, XprVector< E3, Sz > >, Sz > 
eval (const XprVector< E1, Sz > &e1, const Vector< T2, Sz > &v2, const XprVector< E3, Sz > &e3)
 eval(const XprVector<E1, Sz>& e1, const Vector<T2, Sz>& v2, const XprVector<E3, Sz>& e3)
template<class E1 , class E2 , class T3 , std::size_t Sz>
XprVector< XprEval< XprVector
< E1, Sz >, XprVector< E2, Sz >
, VectorConstReference< T3, Sz >
>, Sz > 
eval (const XprVector< E1, Sz > &e1, const XprVector< E2, Sz > &e2, const Vector< T3, Sz > &v3)
 eval(const XprVector<E1, Sz>& e1, const XprVector<E2, Sz>& e2, const Vector<T3, Sz>& v3)
template<class E1 , class E2 , class E3 , std::size_t Sz>
XprVector< XprEval< XprVector
< E1, Sz >, XprVector< E2, Sz >
, XprVector< E3, Sz > >, Sz > 
eval (const XprVector< E1, Sz > &e1, const XprVector< E2, Sz > &e2, const XprVector< E3, Sz > &e3)
 eval(const XprVector<E1, Sz>& e1, const XprVector<E2, Sz>& e2, const XprVector<E3, Sz>& e3)
 TVMET_IMPLEMENT_MACRO (int) TVMET_IMPLEMENT_MACRO(long long int) TVMET_IMPLEMENT_MACRO(float) TVMET_IMPLEMENT_MACRO(double) TVMET_IMPLEMENT_MACRO(long double) template< class E
 eval(const XprVector<E, Sz>& e, std::complex<T> z2, std::complex<T> z3)
template<class E1 , class E3 , std::size_t Sz, class T >
XprVector< XprEval< XprVector
< E1, Sz >, XprLiteral
< std::complex< T >
>, XprVector< E3, Sz > >, Sz > 
eval (const XprVector< E1, Sz > &e1, std::complex< T > z2, const XprVector< E3, Sz > &e3)
 eval(const XprVector<E1, Sz>& e1, std::complex<T> z2, const XprVector<E3, Sz>& e3)
template<class E1 , class E2 , std::size_t Sz, class T >
XprVector< XprEval< XprVector
< E1, Sz >, XprVector< E2, Sz >
, XprLiteral< std::complex< T >
> >, Sz > 
eval (const XprVector< E1, Sz > &e1, const XprVector< E2, Sz > &e2, std::complex< T > z3)
 eval(const XprVector<E1, Sz>& e1, const XprVector<E2, Sz>& e2, std::complex<T> z3)
template<class T , std::size_t Sz>
NumericTraits< T >::sum_type product (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 Compute the product of the vector elements.
template<class T1 , class T2 , std::size_t Sz>
PromoteTraits< T1, T2 >::value_type dot (const Vector< T1, Sz > &lhs, const Vector< T2, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE
 Compute the dot/inner productCompute the dot product as:

\[ \sum_{i = 0}^{Sz - 1} ( lhs[i] * rhs[i] ) \]

where lhs is a column vector and rhs is a row vector, both vectors have the same dimension.

template<class T1 , class T2 >
Vector< typename PromoteTraits
< T1, T2 >::value_type, 3 > 
cross (const Vector< T1, 3 > &lhs, const Vector< T2, 3 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Compute the cross/outer product.
template<class T , std::size_t Sz>
NumericTraits< T >::sum_type norm1 (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 The $l_1$ norm of a vector v.
template<class T , std::size_t Sz>
NumericTraits< T >::sum_type norm2 (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 The euklidian norm (or $l_2$ norm) of a vector v.
template<class T , std::size_t Sz>
XprVector< XprBinOp< Fcnl_div
< T, T >, VectorConstReference
< T, Sz >, XprLiteral< T >
>, Sz > 
normalize (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 Normalize the given vector.
template<class E , std::size_t Sz>
Extremum< typename
E::value_type, std::size_t,
vector_tag
maximum (const XprVector< E, Sz > &e)
 Find the maximum of a vector expression.
template<class T , std::size_t Sz>
Extremum< T, std::size_t,
vector_tag
maximum (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 Find the maximum of a vector.
template<class E , std::size_t Sz>
Extremum< typename
E::value_type, std::size_t,
vector_tag
minimum (const XprVector< E, Sz > &e)
 Find the minimum of a vector expression.
template<class T , std::size_t Sz>
Extremum< T, std::size_t,
vector_tag
minimum (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 Find the minimum of a vector.
template<class E , std::size_t Sz>
E::value_type max (const XprVector< E, Sz > &e)
 Find the maximum of a vector expression.
template<class T , std::size_t Sz>
max (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 Find the maximum of a vector.
template<class E , std::size_t Sz>
E::value_type min (const XprVector< E, Sz > &e)
 Find the minimum of a vector expression.
template<class T , std::size_t Sz>
min (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 Find the minimum of a vector.
template<class T , std::size_t Sz>
XprVector
< VectorConstReference< T, Sz >
, Sz > 
cvector_ref (const T *mem) TVMET_CXX_ALWAYS_INLINE
 Creates an expression wrapper for a C like vector arrays.
template<class T , std::size_t Sz>
std::ostream & operator<< (std::ostream &os, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE
 Overload operator for i/o.
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 > 
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 > 
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 > 
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 > 
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 > 
trans (const XprMatrix< E, Rows, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE
 Transpose an expression matrix.
template<class E , std::size_t Rows, std::size_t Cols>
XprVector< XprMatrixRow
< XprMatrix< E, Rows, Cols >
, Rows, Cols >, Cols > 
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 > 
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 > 
diag (const XprMatrix< E, Sz, Sz > &m) TVMET_CXX_ALWAYS_INLINE
 Returns the diagonal vector of the given square matrix.
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 > 
operator* (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 Rows, std::size_t Cols, class E2 >
XprVector< XprMVProduct
< XprMatrix< E1, Rows, Cols >
, Rows, Cols, XprVector< E2,
Cols > >, Rows > 
operator* (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 Sz>
NumericTraits< typename
E::value_type >::sum_type 
product (const XprVector< E, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 Compute the product of the vector elements.
template<class E1 , class E2 , std::size_t Sz>
PromoteTraits< typename
E1::value_type, typename
E2::value_type >::value_type 
dot (const XprVector< E1, Sz > &lhs, const XprVector< E2, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE
 Compute the dot/inner productCompute the dot product as:

\[ \sum_{i = 0}^{Sz - 1} ( lhs[i] * rhs[i] ) \]

where lhs is a column vector and rhs is a row vector, both vectors have the same dimension.

template<class T , class E , std::size_t Sz>
PromoteTraits< T, typename
E::value_type >::value_type 
dot (const Vector< T, Sz > &lhs, const XprVector< E, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE
 Compute the dot/inner productCompute the dot product as:

\[ \sum_{i = 0}^{Sz - 1} ( lhs[i] * rhs[i] ) \]

where lhs is a column vector and rhs is a row vector, both vectors have the same dimension.

template<class E , class T , std::size_t Sz>
PromoteTraits< T, typename
E::value_type >::value_type 
dot (const XprVector< E, Sz > &lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE
 Compute the dot/inner productCompute the dot product as:

\[ \sum_{i = 0}^{Sz - 1} ( lhs[i] * rhs[i] ) \]

where lhs is a column vector and rhs is a row vector, both vectors have the same dimension.

template<class E1 , class E2 >
Vector< typename PromoteTraits
< typename E1::value_type,
typename E2::value_type >
::value_type, 3 > 
cross (const XprVector< E1, 3 > &lhs, const XprVector< E2, 3 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Compute the cross/outer product.
template<class T , class E >
Vector< typename PromoteTraits
< T, typename E::value_type >
::value_type, 3 > 
cross (const Vector< T, 3 > &lhs, const XprVector< E, 3 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Compute the cross/outer product.
template<class E , class T >
Vector< typename PromoteTraits
< T, typename E::value_type >
::value_type, 3 > 
cross (const XprVector< E, 3 > &lhs, const Vector< T, 3 > &rhs) TVMET_CXX_ALWAYS_INLINE
 Compute the cross/outer product.
template<class E , std::size_t Sz>
NumericTraits< typename
E::value_type >::sum_type 
norm1 (const XprVector< E, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 The $l_1$ norm of a vector expression.
template<class E , std::size_t Sz>
NumericTraits< typename
E::value_type >::sum_type 
norm2 (const XprVector< E, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 The euklidian norm (or $l_2$ norm) of a vector expression.
template<class E , std::size_t Sz>
XprVector< XprBinOp< Fcnl_div
< typename E::value_type,
typename E::value_type >
, XprVector< E, Sz >
, XprLiteral< typename
E::value_type > >, Sz > 
normalize (const XprVector< E, Sz > &v) TVMET_CXX_ALWAYS_INLINE
 Normalize the given vector expression.

Detailed Description

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

forward


Function Documentation

AliasProxy<E> tvmet::alias ( E &  expr )

Simplify syntax for alias Matrices and Vectors, where aliasing left hand values appear in the expression.

Example:
 typedef tvmet::Matrix<double, 10, 10>    matrix_type;
 matrix_type                    m;
 ...
 alias(m) += trans(m);
See also:
AliasProxy
Some Notes alias

Definition at line 49 of file AliasProxy.h.

bool all_elements ( const XprMatrix< E, Rows, Cols > &  e )

check on statements for all elementsThis is for use with boolean operators like

Example:
 all_elements(matrix > 0) {
     // true branch
 } else {
     // false branch
 }
See also:
compare

Definition at line 47 of file MatrixEval.h.

bool all_elements ( const XprVector< E, Sz > &  e )

check on statements for all elementsThis is for use with boolean operators like

Example:
 all_elements(vector > 0) {
     // true branch
 } else {
     // false branch
 }
See also:
compare

Definition at line 52 of file VectorEval.h.

bool any_elements ( const XprMatrix< E, Rows, Cols > &  e )

check on statements for any elementsThis is for use with boolean operators like

Example:
 any_elements(matrix > 0) {
     // true branch
 } else {
     // false branch
 }
See also:
compare

Definition at line 69 of file MatrixEval.h.

bool any_elements ( const XprVector< E, Sz > &  e )

check on statements for any elementsThis is for use with boolean operators like

Example:
 any_elements(vector > 0) {
     // true branch
 } else {
     // false branch
 }
See also:
compare

Definition at line 74 of file VectorEval.h.

XprMatrix< MatrixConstReference< T, Rows, Cols >, Rows, Cols > cmatrix_ref ( const T *  mem )

Creates an expression wrapper for a C like matrices.

This is like creating a matrix of external data, as described at construct. With this function you wrap an expression around a C style matrix and you can operate directly with it as usual.

Example:
 static float lhs[3][3] = {
   {-1,  0,  1}, { 1,  0,  1}, {-1,  0, -1}
 };
 static float rhs[3][3] = {
   { 0,  1,  1}, { 0,  1, -1}, { 0, -1,  1}
 };
 ...

 typedef Matrix<float, 3, 3>            matrix_type;

 matrix_type M( cmatrix_ref<float, 3, 3>(&lhs[0][0])
                *  cmatrix_ref<float, 3, 3>(&rhs[0][0]) );
Since:
release 1.6.0

Definition at line 1363 of file MatrixFunctions.h.

XprVector< XprMatrixCol< MatrixConstReference< T, Rows, Cols >, Rows, Cols >, Rows > col ( const Matrix< T, Rows, Cols > &  m,
std::size_t  no 
)

Returns a column vector of the given matrix.

Definition at line 1046 of file MatrixFunctions.h.

XprVector< XprMatrixCol< XprMatrix< E, Rows, Cols >, Rows, Cols >, Rows > col ( const XprMatrix< E, Rows, Cols > &  m,
std::size_t  no 
)

Returns a column vector of the given matrix.

Definition at line 721 of file xpr/MatrixFunctions.h.

Vector< typename PromoteTraits< T1, T2 >::value_type, 3 > cross ( const Vector< T1, 3 > &  lhs,
const Vector< T2, 3 > &  rhs 
)

Compute the cross/outer product.

Note:
working only for vectors of size = 3

Definition at line 590 of file VectorFunctions.h.

Vector< typename PromoteTraits< typename E1::value_type, typename E2::value_type >::value_type, 3 > cross ( const XprVector< E1, 3 > &  lhs,
const XprVector< E2, 3 > &  rhs 
)

Compute the cross/outer product.

Note:
working only for vectors of size = 3

Definition at line 552 of file xpr/VectorFunctions.h.

cross ( const Vector< T, 3 > &  lhs,
const XprVector< E, 3 > &  rhs 
)

Compute the cross/outer product.

Note:
working only for vectors of size = 3
Vector< typename PromoteTraits< T, typename E::value_type >::value_type, 3 > cross ( const XprVector< E, 3 > &  lhs,
const Vector< T, 3 > &  rhs 
)

Compute the cross/outer product.

Note:
working only for vectors of size = 3

Definition at line 574 of file xpr/VectorFunctions.h.

XprVector< VectorConstReference< T, Sz >, Sz > cvector_ref ( const T *  mem )

Creates an expression wrapper for a C like vector arrays.

This is like creating a vector of external data, as described at construct. With this function you wrap an expression around a C style vector array and you can operate directly with it as usual.

Example:
 static float vertices[N][3] = {
   {-1,  0,  1}, { 1,  0,  1}, ...
 };
 ...
 typedef Vector<float, 3>            vector_type;
 ...
 vector_type V( cross(cvector_ref<float, 3>(&vertices[0][0]),
                      cvector_ref<float, 3>(&vertices[1][0])) );
Since:
release 1.6.0

Definition at line 869 of file VectorFunctions.h.

XprVector< XprMatrixDiag< MatrixConstReference< T, Sz, Sz >, Sz >, Sz > diag ( const Matrix< T, Sz, Sz > &  m )

Returns the diagonal vector of the given square matrix.

Definition at line 1069 of file MatrixFunctions.h.

XprVector< XprMatrixDiag< XprMatrix< E, Sz, Sz >, Sz >, Sz > diag ( const XprMatrix< E, Sz, Sz > &  m )

Returns the diagonal vector of the given square matrix.

Definition at line 745 of file xpr/MatrixFunctions.h.

PromoteTraits< T1, T2 >::value_type dot ( const Vector< T1, Sz > &  lhs,
const Vector< T2, Sz > &  rhs 
)

Compute the dot/inner productCompute the dot product as:

\[ \sum_{i = 0}^{Sz - 1} ( lhs[i] * rhs[i] ) \]

where lhs is a column vector and rhs is a row vector, both vectors have the same dimension.

Definition at line 575 of file VectorFunctions.h.

PromoteTraits< typename E1::value_type, typename E2::value_type >::value_type dot ( const XprVector< E1, Sz > &  lhs,
const XprVector< E2, Sz > &  rhs 
)

Compute the dot/inner productCompute the dot product as:

\[ \sum_{i = 0}^{Sz - 1} ( lhs[i] * rhs[i] ) \]

where lhs is a column vector and rhs is a row vector, both vectors have the same dimension.

Definition at line 491 of file xpr/VectorFunctions.h.

PromoteTraits< T, typename E::value_type >::value_type dot ( const Vector< T, Sz > &  lhs,
const XprVector< E, Sz > &  rhs 
)

Compute the dot/inner productCompute the dot product as:

\[ \sum_{i = 0}^{Sz - 1} ( lhs[i] * rhs[i] ) \]

where lhs is a column vector and rhs is a row vector, both vectors have the same dimension.

Definition at line 511 of file xpr/VectorFunctions.h.

PromoteTraits< T, typename E::value_type >::value_type dot ( const XprVector< E, Sz > &  lhs,
const Vector< T, Sz > &  rhs 
)

Compute the dot/inner productCompute the dot product as:

\[ \sum_{i = 0}^{Sz - 1} ( lhs[i] * rhs[i] ) \]

where lhs is a column vector and rhs is a row vector, both vectors have the same dimension.

Definition at line 531 of file xpr/VectorFunctions.h.

XprVector< XprEval< XprVector<E1, Sz>, XprVector<E2, Sz>, VectorConstReference<T3, Sz> >, Sz> tvmet::eval ( const XprVector< E1, Sz > &  e1,
const XprVector< E2, Sz > &  e2,
const Vector< T3, Sz > &  v3 
)

eval(const XprVector<E1, Sz>& e1, const XprVector<E2, Sz>& e2, const Vector<T3, Sz>& v3)

Evals the vector expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 160 of file VectorEval.h.

XprVector< XprEval< XprVector<E1, Sz>, XprVector<E2, Sz>, XprVector<E3, Sz> >, Sz> tvmet::eval ( const XprVector< E1, Sz > &  e1,
const XprVector< E2, Sz > &  e2,
const XprVector< E3, Sz > &  e3 
)

eval(const XprVector<E1, Sz>& e1, const XprVector<E2, Sz>& e2, const XprVector<E3, Sz>& e3)

Evals the vector expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 188 of file VectorEval.h.

XprVector< XprEval< XprVector<E1, Sz>, XprLiteral< std::complex<T> >, XprVector<E3, Sz> >, Sz> tvmet::eval ( const XprVector< E1, Sz > &  e1,
std::complex< T >  z2,
const XprVector< E3, Sz > &  e3 
)

eval(const XprVector<E1, Sz>& e1, std::complex<T> z2, const XprVector<E3, Sz>& e3)

Evals the vector expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 336 of file VectorEval.h.

XprVector< XprEval< XprVector<E1, Sz>, XprVector<E2, Sz>, XprLiteral< std::complex<T> > >, Sz> tvmet::eval ( const XprVector< E1, Sz > &  e1,
const XprVector< E2, Sz > &  e2,
std::complex< T >  z3 
)

eval(const XprVector<E1, Sz>& e1, const XprVector<E2, Sz>& e2, std::complex<T> z3)

Evals the vector expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 363 of file VectorEval.h.

XprVector< XprEval< XprVector<E1, Sz>, VectorConstReference<T2, Sz>, VectorConstReference<T3, Sz> >, Sz> tvmet::eval ( const XprVector< E1, Sz > &  e1,
const Vector< T2, Sz > &  v2,
const Vector< T3, Sz > &  v3 
)

eval(const XprVector<E1, Sz>& e1, const Vector<T2, Sz>& v2, const Vector<T3, Sz>& v3)

Evals the vector expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 104 of file VectorEval.h.

XprVector< XprEval< XprVector<E1, Sz>, VectorConstReference<T2, Sz>, XprVector<E3, Sz> >, Sz> tvmet::eval ( const XprVector< E1, Sz > &  e1,
const Vector< T2, Sz > &  v2,
const XprVector< E3, Sz > &  e3 
)

eval(const XprVector<E1, Sz>& e1, const Vector<T2, Sz>& v2, const XprVector<E3, Sz>& e3)

Evals the vector expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 132 of file VectorEval.h.

eval ( const XprMatrix< E1, Rows, Cols > &  e1,
const Matrix< T2, Rows, Cols > &  m2,
const Matrix< T3, Rows, Cols > &  m3 
)

Evals the matrix expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 100 of file MatrixEval.h.

eval ( const XprMatrix< E1, Rows, Cols > &  e1,
const Matrix< T2, Rows, Cols > &  m2,
const XprMatrix< E3, Rows, Cols > &  e3 
)

Evals the matrix expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 130 of file MatrixEval.h.

eval ( const XprMatrix< E1, Rows, Cols > &  e1,
const XprMatrix< E2, Rows, Cols > &  e2,
const Matrix< T3, Rows, Cols > &  m3 
)

Evals the matrix expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 160 of file MatrixEval.h.

eval ( const XprMatrix< E1, Rows, Cols > &  e1,
const XprMatrix< E2, Rows, Cols > &  e2,
const XprMatrix< E3, Rows, Cols > &  e3 
)

Evals the matrix expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 190 of file MatrixEval.h.

eval ( const XprMatrix< E1, Rows, Cols > &  e1,
const std::complex< T > &  x2,
const XprMatrix< E3, Rows, Cols > &  e3 
)

Evals the matrix expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 340 of file MatrixEval.h.

eval ( const XprMatrix< E1, Rows, Cols > &  e1,
const XprMatrix< E2, Rows, Cols > &  e2,
const std::complex< T > &  x3 
)

Evals the matrix expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.

Definition at line 368 of file MatrixEval.h.

XprMatrix< XprIdentity< typename M::value_type, M::Rows, M::Cols >, M::Rows, M::Cols > identity (  )

Fill a matrix to an identity matrix.

Fill a matrix to an identity matrix (convenience wrapper for matrix typedefs).

Note:
The matrix doesn't need to be square. Only the elements where the current number of rows are equal to columns will be set to 1, else to 0.
Usage:
 typedef Matrix<double,3,3>        matrix_type;
 ...
 matrix_type E( identity<double, 3, 3>() );

Note, we have to specify the type, number of rows and columns since ADL can't work here.

Since:
release 1.6.0
Note:
The matrix doesn't need to be square. Only the elements where the current number of rows are equal to columns will be set to 1, else to 0.
Usage:
 typedef Matrix<double,3,3>        matrix_type;
 ...
 matrix_type E( identity<matrix_type>() );

Note, we have to specify the matrix type, since ADL can't work here.

Since:
release 1.6.0

Definition at line 1289 of file MatrixFunctions.h.

E::value_type max ( const XprVector< E, Sz > &  e )

Find the maximum of a vector expression.

Definition at line 757 of file VectorFunctions.h.

T max ( const Vector< T, Sz > &  v )

Find the maximum of a vector.

Definition at line 778 of file VectorFunctions.h.

T max ( const Matrix< T, Rows, Cols > &  m )

Find the maximum of a matrix.

Definition at line 1190 of file MatrixFunctions.h.

E::value_type max ( const XprMatrix< E, Rows, Cols > &  e )

Find the maximum of a matrix expression.

Definition at line 1169 of file MatrixFunctions.h.

Extremum< typename E::value_type, std::size_t, vector_tag > maximum ( const XprVector< E, Sz > &  e )

Find the maximum of a vector expression.

Definition at line 683 of file VectorFunctions.h.

Extremum< T, std::size_t, vector_tag > maximum ( const Vector< T, Sz > &  v )

Find the maximum of a vector.

Definition at line 709 of file VectorFunctions.h.

Extremum< typename E::value_type, std::size_t, matrix_tag > maximum ( const XprMatrix< E, Rows, Cols > &  e )

Find the maximum of a matrix expression.

Definition at line 1091 of file MatrixFunctions.h.

Extremum< T, std::size_t, matrix_tag > maximum ( const Matrix< T, Rows, Cols > &  m )

Find the maximum of a matrix.

Definition at line 1119 of file MatrixFunctions.h.

E::value_type min ( const XprVector< E, Sz > &  e )

Find the minimum of a vector expression.

Definition at line 802 of file VectorFunctions.h.

T min ( const Vector< T, Sz > &  v )

Find the minimum of a vector.

Definition at line 823 of file VectorFunctions.h.

E::value_type min ( const XprMatrix< E, Rows, Cols > &  e )

Find the minimum of a matrix expression.

Definition at line 1216 of file MatrixFunctions.h.

T min ( const Matrix< T, Rows, Cols > &  m )

Find the minimum of a matrix.

Definition at line 1237 of file MatrixFunctions.h.

Extremum< typename E::value_type, std::size_t, vector_tag > minimum ( const XprVector< E, Sz > &  e )

Find the minimum of a vector expression.

Definition at line 720 of file VectorFunctions.h.

Extremum< T, std::size_t, vector_tag > minimum ( const Vector< T, Sz > &  v )

Find the minimum of a vector.

Definition at line 746 of file VectorFunctions.h.

Extremum< typename E::value_type, std::size_t, matrix_tag > minimum ( const XprMatrix< E, Rows, Cols > &  e )

Find the minimum of a matrix expression.

Definition at line 1130 of file MatrixFunctions.h.

Extremum< T, std::size_t, matrix_tag > minimum ( const Matrix< T, Rows, Cols > &  m )

Find the minimum of a matrix.

Definition at line 1158 of file MatrixFunctions.h.

XprMatrix< XprMMtProduct< MatrixConstReference< T1, Rows1, Cols1 >, Rows1, Cols1, MatrixConstReference< T2, Rows2, Cols1 >, Cols1 >, Rows1, Rows2 > MMt_prod ( const Matrix< T1, Rows1, Cols1 > &  lhs,
const Matrix< T2, Rows2, Cols1 > &  rhs 
)

Function for the matrix-trans(matrix)-product.

Note:
The Cols2 has to be equal to Cols1.

Definition at line 849 of file MatrixFunctions.h.

XprMatrix< XprMMtProduct< XprMatrix< E1, Rows1, Cols1 >, Rows1, Cols1, XprMatrix< E2, Rows2, Cols1 >, Cols1 >, Rows1, Rows2 > MMt_prod ( const XprMatrix< E1, Rows1, Cols1 > &  lhs,
const XprMatrix< E2, Rows2, Cols1 > &  rhs 
)

Function for the matrix-trans(matrix)-product.

Note:
The cols2 has to be equal to cols1.

Definition at line 601 of file xpr/MatrixFunctions.h.

XprMatrix< XprMtMProduct< MatrixConstReference< T1, Rows1, Cols1 >, Rows1, Cols1, MatrixConstReference< T2, Rows1, Cols2 >, Cols2 >, Cols1, Cols2 > MtM_prod ( const Matrix< T1, Rows1, Cols1 > &  lhs,
const Matrix< T2, Rows1, Cols2 > &  rhs 
)

Function for the trans(matrix)-matrix-product.

using formula

\[ M_1^{T}\,M_2 \]

Note:
The number of cols of matrix 2 have to be equal to number of rows of matrix 1, since matrix 1 is trans - the result is a (Cols1 x Cols2) matrix.

Definition at line 823 of file MatrixFunctions.h.

XprMatrix< XprMtMProduct< XprMatrix< E1, Rows1, Cols1 >, Rows1, Cols1, XprMatrix< E2, Rows1, Cols2 >, Cols2 >, Cols1, Cols2 > MtM_prod ( const XprMatrix< E1, Rows1, Cols1 > &  lhs,
const XprMatrix< E2, Rows1, Cols2 > &  rhs 
)

Function for the trans(matrix)-matrix-product.

using formula

\[ M_1^{T}\,M_2 \]

Note:
The number of cols of matrix 2 have to be equal to number of rows of matrix 1, since matrix 1 is trans - the result is a (Cols1 x Cols2) matrix.

Definition at line 576 of file xpr/MatrixFunctions.h.

XprVector< XprMtVProduct< MatrixConstReference< T1, Rows, Cols >, Rows, Cols, VectorConstReference< T2, Rows > >, Cols > Mtx_prod ( const Matrix< T1, Rows, Cols > &  lhs,
const Vector< T2, Rows > &  rhs 
)

Function for the trans(matrix)-vector-productPerform on given Matrix M and vector x:

\[ M^T\, x \]

.

Definition at line 954 of file MatrixFunctions.h.

NumericTraits< T >::sum_type norm1 ( const Vector< T, Sz > &  v )

The $l_1$ norm of a vector v.

The norm of any vector is just the square root of the dot product of a vector with itself, or

\[ |Vector<T, Sz> v| = |v| = \sum_{i=0}^{Sz-1}\,|v[i]| \]

Definition at line 612 of file VectorFunctions.h.

NumericTraits< typename E::value_type >::sum_type norm1 ( const XprVector< E, Sz > &  v )

The $l_1$ norm of a vector expression.

The norm of any vector is just the square root of the dot product of a vector with itself, or

\[ |Vector<T, Sz> v| = |v| = \sum_{i=0}^{Sz-1}\,|v[i]| \]

Definition at line 617 of file xpr/VectorFunctions.h.

NumericTraits< T >::sum_type norm2 ( const Vector< T, Sz > &  v )

The euklidian norm (or $l_2$ norm) of a vector v.

The norm of any vector is just the square root of the dot product of a vector with itself, or

\[ |Vector<T, Sz> v| = |v| = \sqrt{ \sum_{i=0}^{Sz-1}\,v[i]^2 } \]

Note:
The internal cast for Vector<int> avoids warnings on sqrt.

Definition at line 633 of file VectorFunctions.h.

NumericTraits< typename E::value_type >::sum_type norm2 ( const XprVector< E, Sz > &  v )

The euklidian norm (or $l_2$ norm) of a vector expression.

The norm of any vector is just the square root of the dot product of a vector with itself, or

\[ |Vector<T, Sz> v| = |v| = \sqrt{ \sum_{i=0}^{Sz-1}\,v[i]^2 } \]

Note:
The internal cast for Vector<int> avoids warnings on sqrt.

Definition at line 638 of file xpr/VectorFunctions.h.

XprVector< XprBinOp< Fcnl_div< T, T >, VectorConstReference< T, Sz >, XprLiteral< T > >, Sz > normalize ( const Vector< T, Sz > &  v )

Normalize the given vector.

See also:
norm2

using the equation:

\[ \frac{Vector<T, Sz> v}{\sqrt{ \sum_{i=0}^{Sz-1}\,v[i]^2 }} \]

Definition at line 659 of file VectorFunctions.h.

XprVector< XprBinOp< Fcnl_div< typename E::value_type, typename E::value_type >, XprVector< E, Sz >, XprLiteral< typename E::value_type > >, Sz > normalize ( const XprVector< E, Sz > &  v )

Normalize the given vector expression.

See also:
norm2

using the equation:

\[ \frac{Vector<T, Sz> v}{\sqrt{ \sum_{i=0}^{Sz-1}\,v[i]^2 }} \]

Definition at line 665 of file xpr/VectorFunctions.h.

XprVector< XprMVProduct< XprMatrix< E1, Rows, Cols >, Rows, Cols, XprVector< E2, Cols > >, Rows > operator* ( const XprMatrix< E1, Rows, Cols > &  lhs,
const XprVector< E2, Cols > &  rhs 
)

Evaluate the product of XprMatrix and XprVector.

See also:
prod(XprMatrix<E1, Rows, Cols> lhs, XprVector<E2, Cols> rhs)

Definition at line 657 of file xpr/MatrixOperators.h.

XprMatrix< XprMMProduct< XprMatrix< E1, Rows1, Cols1 >, Rows1, Cols1, XprMatrix< E2, Cols1, Cols2 >, Cols2 >, Rows1, Cols2 > operator* ( const XprMatrix< E1, Rows1, Cols1 > &  lhs,
const XprMatrix< E2, Cols1, Cols2 > &  rhs 
)

Evaluate the product of two XprMatrix.

See also:
prod(XprMatrix<E1, Rows1, Cols1> lhs, XprMatrix<E2, Cols1, Cols2> rhs)

Definition at line 631 of file xpr/MatrixOperators.h.

std::ostream & operator<< ( std::ostream &  os,
const Vector< T, Sz > &  rhs 
)

Overload operator for i/o.

Definition at line 506 of file VectorOperators.h.

operator<< ( std::ostream &  os,
const TvmetBase< E > &  e 
)

overloaded ostream operator using static polymorphic.

Definition at line 79 of file TvmetBase.h.

XprMatrix< XprMMProduct< XprMatrix< E1, Rows1, Cols1 >, Rows1, Cols1, MatrixConstReference< T2, Cols1, Cols2 >, Cols2 >, Rows1, Cols2 > prod ( const XprMatrix< E1, Rows1, Cols1 > &  lhs,
const Matrix< T2, Cols1, Cols2 > &  rhs 
)

Evaluate the product of XprMatrix and Matrix.

Definition at line 737 of file MatrixFunctions.h.

XprMatrix< XprMMProduct< MatrixConstReference< T1, Rows1, Cols1 >, Rows1, Cols1, XprMatrix< E2, Cols1, Cols2 >, Cols2 >, Rows1, Cols2 > prod ( const Matrix< T1, Rows1, Cols1 > &  lhs,
const XprMatrix< E2, Cols1, Cols2 > &  rhs 
)

Evaluate the product of Matrix and XprMatrix.

Definition at line 762 of file MatrixFunctions.h.

XprVector< XprMVProduct< MatrixConstReference< T1, Rows, Cols >, Rows, Cols, XprVector< E2, Cols > >, Rows > prod ( const Matrix< T1, Rows, Cols > &  lhs,
const XprVector< E2, Cols > &  rhs 
)

Function for the matrix-vector-product.

Definition at line 902 of file MatrixFunctions.h.

XprVector< XprMVProduct< MatrixConstReference< T1, Rows, Cols >, Rows, Cols, VectorConstReference< T2, Cols > >, Rows > prod ( const Matrix< T1, Rows, Cols > &  lhs,
const Vector< T2, Cols > &  rhs 
)

Function for the matrix-vector-product.

Definition at line 878 of file MatrixFunctions.h.

XprVector< XprMVProduct< XprMatrix< E1, Rows, Cols >, Rows, Cols, XprVector< E2, Cols > >, Rows > prod ( const XprMatrix< E1, Rows, Cols > &  lhs,
const XprVector< E2, Cols > &  rhs 
)

Evaluate the product of XprMatrix and XprVector.

Definition at line 630 of file xpr/MatrixFunctions.h.

NumericTraits< T >::sum_type product ( const Vector< T, Sz > &  v )

Compute the product of the vector elements.

Simply computer the product of the given vector as:

\[ \prod_{i = 0}^{Sz - 1} v[i] \]

Definition at line 555 of file VectorFunctions.h.

NumericTraits< typename E::value_type >::sum_type product ( const XprVector< E, Sz > &  v )

Compute the product of the vector elements.

Simply computer the product of the given vector expression as:

\[ \prod_{i = 0}^{Sz - 1} v[i] \]

Definition at line 468 of file xpr/VectorFunctions.h.

XprVector< XprMatrixRow< MatrixConstReference< T, Rows, Cols >, Rows, Cols >, Cols > row ( const Matrix< T, Rows, Cols > &  m,
std::size_t  no 
)

Returns a row vector of the given matrix.

Definition at line 1023 of file MatrixFunctions.h.

XprVector< XprMatrixRow< XprMatrix< E, Rows, Cols >, Rows, Cols >, Cols > row ( const XprMatrix< E, Rows, Cols > &  m,
std::size_t  no 
)

Returns a row vector of the given matrix.

Definition at line 697 of file xpr/MatrixFunctions.h.

XprMatrix< XprMatrixTranspose< MatrixConstReference< T, Rows, Cols > >, Cols, Rows > trans ( const Matrix< T, Rows, Cols > &  rhs )

Transpose the matrix.

Definition at line 982 of file MatrixFunctions.h.

XprMatrix< XprMatrixTranspose< XprMatrix< E, Rows, Cols > >, Cols, Rows > trans ( const XprMatrix< E, Rows, Cols > &  rhs )

Transpose an expression matrix.

Definition at line 657 of file xpr/MatrixFunctions.h.

XprMatrix< XprMMProductTransposed< MatrixConstReference< T1, Rows1, Cols1 >, Rows1, Cols1, MatrixConstReference< T2, Cols1, Cols2 >, Cols2 >, Cols2, Rows1 > trans_prod ( const Matrix< T1, Rows1, Cols1 > &  lhs,
const Matrix< T2, Cols1, Cols2 > &  rhs 
)

Function for the trans(matrix-matrix-product)Perform on given Matrix M1 and M2:

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

.

Definition at line 791 of file MatrixFunctions.h.

XprMatrix< XprMMProductTransposed< XprMatrix< E1, Rows1, Cols1 >, Rows1, Cols1, XprMatrix< E2, Cols1, Cols2 >, Cols2 >, Cols2, Rows1 > trans_prod ( const XprMatrix< E1, Rows1, Cols1 > &  lhs,
const XprMatrix< E2, Cols1, Cols2 > &  rhs 
)

Function for the trans(matrix-matrix-product) Perform on given Matrix M1 and M2:

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

.

Note:
The numer of Rows2 has to be equal to Cols1.

Definition at line 545 of file xpr/MatrixFunctions.h.

tvmet::TVMET_IMPLEMENT_MACRO ( int   )

eval(const XprVector<E, Sz>& e, std::complex<T> z2, std::complex<T> z3)

Evals the vector expressions.

This eval is for the a?b:c syntax, since it's not allowed to overload these operators.