|
Tiny Vector Matrix library using Expression Templates | Sourceforge Project Page |
#include <tvmet/Extremum.h>
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 T , std::size_t Sz> | |
NumericTraits< T >::sum_type | tvmet::sum (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE |
Compute the sum of the vector. | |
template<class T , std::size_t Sz> | |
NumericTraits< T >::sum_type | tvmet::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 | tvmet::dot (const Vector< T1, Sz > &lhs, const Vector< T2, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
Compute the dot/inner productCompute the dot product as:
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 > | tvmet::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 | tvmet::norm1 (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE |
The ![]() | |
template<class T , std::size_t Sz> | |
NumericTraits< T >::sum_type | tvmet::norm2 (const Vector< T, Sz > &v) TVMET_CXX_ALWAYS_INLINE |
The euklidian norm (or ![]() | |
template<class T , std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div < T, T >, VectorConstReference < T, Sz >, XprLiteral< T > >, Sz > | tvmet::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 > | tvmet::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 > | tvmet::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 > | tvmet::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 > | tvmet::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 | tvmet::max (const XprVector< E, Sz > &e) |
Find the maximum of a vector expression. | |
template<class T , std::size_t Sz> | |
T | tvmet::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 | tvmet::min (const XprVector< E, Sz > &e) |
Find the minimum of a vector expression. | |
template<class T , std::size_t Sz> | |
T | tvmet::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 > | tvmet::cvector_ref (const T *mem) TVMET_CXX_ALWAYS_INLINE |
Creates an expression wrapper for a C like vector arrays. | |
tvmet::TVMET_IMPLEMENT_MACRO (add) TVMET_IMPLEMENT_MACRO(sub) namespace element_wise |
#define TVMET_DECLARE_MACRO | ( | NAME | ) |
#define TVMET_DECLARE_MACRO | ( | NAME, | |
POD | |||
) |
template<class T, std::size_t Sz> \ XprVector< \ XprBinOp< \ Fcnl_##NAME< T, POD >, \ VectorConstReference<T, Sz>, \ XprLiteral< POD > \ >, \ Sz \ > \ NAME (const Vector<T, Sz>& lhs, \ POD rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class T, std::size_t Sz> \ XprVector< \ XprBinOp< \ Fcnl_##NAME< POD, T>, \ XprLiteral< POD >, \ VectorConstReference<T, Sz> \ >, \ Sz \ > \ NAME (POD lhs, \ const Vector<T, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME | ) |
template<class T, std::size_t Sz> \ XprVector< \ XprBinOp< \ Fcnl_##NAME< std::complex<T>, std::complex<T> >, \ VectorConstReference< std::complex<T>, Sz>, \ XprLiteral< std::complex<T> > \ >, \ Sz \ > \ NAME (const Vector<std::complex<T>, Sz>& lhs, \ const std::complex<T>& rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class T, std::size_t Sz> \ XprVector< \ XprBinOp< \ Fcnl_##NAME< std::complex<T>, std::complex<T> >, \ XprLiteral< std::complex<T> >, \ VectorConstReference< std::complex<T>, Sz> \ >, \ Sz \ > \ NAME (const std::complex<T>& lhs, \ const Vector< std::complex<T>, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_IMPLEMENT_MACRO | ( | NAME | ) |
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
POD | |||
) |
#define TVMET_IMPLEMENT_MACRO | ( | NAME | ) |
Author: |