Tiny Vector Matrix library using Expression Templates | Sourceforge Project Page |
#include <tvmet/Extremum.h>
Include dependency graph for VectorFunctions.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | tvmet |
namespace | tvmet::element_wise |
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 | |
template<class T1, class T2, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< T1, T2 >, VectorConstReference< T1, Sz >, VectorConstReference< T2, Sz > >, Sz > | tvmet::add (const Vector< T1, Sz > &lhs, const Vector< T2, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class E, class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< typename E::value_type, T >, XprVector< E, Sz >, VectorConstReference< T, Sz > >, Sz > | tvmet::add (const XprVector< E, Sz > &lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class E, class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< T, typename E::value_type >, VectorConstReference< T, Sz >, XprVector< E, Sz > >, Sz > | tvmet::add (const Vector< T, Sz > &lhs, const XprVector< E, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T1, class T2, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< T1, T2 >, VectorConstReference< T1, Sz >, VectorConstReference< T2, Sz > >, Sz > | tvmet::sub (const Vector< T1, Sz > &lhs, const Vector< T2, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class E, class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< typename E::value_type, T >, XprVector< E, Sz >, VectorConstReference< T, Sz > >, Sz > | tvmet::sub (const XprVector< E, Sz > &lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class E, class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< T, typename E::value_type >, VectorConstReference< T, Sz >, XprVector< E, Sz > >, Sz > | tvmet::sub (const Vector< T, Sz > &lhs, const XprVector< E, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T1, class T2, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< T1, T2 >, VectorConstReference< T1, Sz >, VectorConstReference< T2, Sz > >, Sz > | tvmet::mul (const Vector< T1, Sz > &lhs, const Vector< T2, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class E, class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< typename E::value_type, T >, XprVector< E, Sz >, VectorConstReference< T, Sz > >, Sz > | tvmet::mul (const XprVector< E, Sz > &lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class E, class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< T, typename E::value_type >, VectorConstReference< T, Sz >, XprVector< E, Sz > >, Sz > | tvmet::mul (const Vector< T, Sz > &lhs, const XprVector< E, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T1, class T2, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< T1, T2 >, VectorConstReference< T1, Sz >, VectorConstReference< T2, Sz > >, Sz > | tvmet::element_wise::div (const Vector< T1, Sz > &lhs, const Vector< T2, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class E, class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< typename E::value_type, T >, XprVector< E, Sz >, VectorConstReference< T, Sz > >, Sz > | tvmet::element_wise::div (const XprVector< E, Sz > &lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class E, class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< T, typename E::value_type >, VectorConstReference< T, Sz >, XprVector< E, Sz > >, Sz > | tvmet::element_wise::div (const Vector< T, Sz > &lhs, const XprVector< E, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< T, int >, VectorConstReference< T, Sz >, XprLiteral< int > >, Sz > | tvmet::add (const Vector< T, Sz > &lhs, int rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< int, T >, XprLiteral< int >, VectorConstReference< T, Sz > >, Sz > | tvmet::add (int lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< T, int >, VectorConstReference< T, Sz >, XprLiteral< int > >, Sz > | tvmet::sub (const Vector< T, Sz > &lhs, int rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< int, T >, XprLiteral< int >, VectorConstReference< T, Sz > >, Sz > | tvmet::sub (int lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< T, int >, VectorConstReference< T, Sz >, XprLiteral< int > >, Sz > | tvmet::mul (const Vector< T, Sz > &lhs, int rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< int, T >, XprLiteral< int >, VectorConstReference< T, Sz > >, Sz > | tvmet::mul (int lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< T, int >, VectorConstReference< T, Sz >, XprLiteral< int > >, Sz > | tvmet::div (const Vector< T, Sz > &lhs, int rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< int, T >, XprLiteral< int >, VectorConstReference< T, Sz > >, Sz > | tvmet::div (int lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< T, float >, VectorConstReference< T, Sz >, XprLiteral< float > >, Sz > | tvmet::add (const Vector< T, Sz > &lhs, float rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< float, T >, XprLiteral< float >, VectorConstReference< T, Sz > >, Sz > | tvmet::add (float lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< T, float >, VectorConstReference< T, Sz >, XprLiteral< float > >, Sz > | tvmet::sub (const Vector< T, Sz > &lhs, float rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< float, T >, XprLiteral< float >, VectorConstReference< T, Sz > >, Sz > | tvmet::sub (float lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< T, float >, VectorConstReference< T, Sz >, XprLiteral< float > >, Sz > | tvmet::mul (const Vector< T, Sz > &lhs, float rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< float, T >, XprLiteral< float >, VectorConstReference< T, Sz > >, Sz > | tvmet::mul (float lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< T, float >, VectorConstReference< T, Sz >, XprLiteral< float > >, Sz > | tvmet::div (const Vector< T, Sz > &lhs, float rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< float, T >, XprLiteral< float >, VectorConstReference< T, Sz > >, Sz > | tvmet::div (float lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< T, double >, VectorConstReference< T, Sz >, XprLiteral< double > >, Sz > | tvmet::add (const Vector< T, Sz > &lhs, double rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< double, T >, XprLiteral< double >, VectorConstReference< T, Sz > >, Sz > | tvmet::add (double lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< T, double >, VectorConstReference< T, Sz >, XprLiteral< double > >, Sz > | tvmet::sub (const Vector< T, Sz > &lhs, double rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< double, T >, XprLiteral< double >, VectorConstReference< T, Sz > >, Sz > | tvmet::sub (double lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< T, double >, VectorConstReference< T, Sz >, XprLiteral< double > >, Sz > | tvmet::mul (const Vector< T, Sz > &lhs, double rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< double, T >, XprLiteral< double >, VectorConstReference< T, Sz > >, Sz > | tvmet::mul (double lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< T, double >, VectorConstReference< T, Sz >, XprLiteral< double > >, Sz > | tvmet::div (const Vector< T, Sz > &lhs, double rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< double, T >, XprLiteral< double >, VectorConstReference< T, Sz > >, Sz > | tvmet::div (double lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< T, long double >, VectorConstReference< T, Sz >, XprLiteral< long double > >, Sz > | tvmet::add (const Vector< T, Sz > &lhs, long double rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< long double, T >, XprLiteral< long double >, VectorConstReference< T, Sz > >, Sz > | tvmet::add (long double lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< T, long double >, VectorConstReference< T, Sz >, XprLiteral< long double > >, Sz > | tvmet::sub (const Vector< T, Sz > &lhs, long double rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< long double, T >, XprLiteral< long double >, VectorConstReference< T, Sz > >, Sz > | tvmet::sub (long double lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< T, long double >, VectorConstReference< T, Sz >, XprLiteral< long double > >, Sz > | tvmet::mul (const Vector< T, Sz > &lhs, long double rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< long double, T >, XprLiteral< long double >, VectorConstReference< T, Sz > >, Sz > | tvmet::mul (long double lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< T, long double >, VectorConstReference< T, Sz >, XprLiteral< long double > >, Sz > | tvmet::div (const Vector< T, Sz > &lhs, long double rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< long double, T >, XprLiteral< long double >, VectorConstReference< T, Sz > >, Sz > | tvmet::div (long double lhs, const Vector< T, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_add< std::complex< T >, std::complex< T > >, VectorConstReference< std::complex< T >, Sz >, XprLiteral< std::complex< T > > >, Sz > | tvmet::add (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_add< std::complex< T >, std::complex< T > >, XprLiteral< std::complex< T > >, VectorConstReference< std::complex< T >, Sz > >, Sz > | tvmet::add (const std::complex< T > &lhs, const Vector< std::complex< T >, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_sub< std::complex< T >, std::complex< T > >, VectorConstReference< std::complex< T >, Sz >, XprLiteral< std::complex< T > > >, Sz > | tvmet::sub (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_sub< std::complex< T >, std::complex< T > >, XprLiteral< std::complex< T > >, VectorConstReference< std::complex< T >, Sz > >, Sz > | tvmet::sub (const std::complex< T > &lhs, const Vector< std::complex< T >, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_mul< std::complex< T >, std::complex< T > >, VectorConstReference< std::complex< T >, Sz >, XprLiteral< std::complex< T > > >, Sz > | tvmet::mul (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_mul< std::complex< T >, std::complex< T > >, XprLiteral< std::complex< T > >, VectorConstReference< std::complex< T >, Sz > >, Sz > | tvmet::mul (const std::complex< T > &lhs, const Vector< std::complex< T >, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
template<class T, std::size_t Sz> | |
XprVector< XprBinOp< Fcnl_div< std::complex< T >, std::complex< T > >, VectorConstReference< std::complex< T >, Sz >, XprLiteral< std::complex< T > > >, Sz > | tvmet::div (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_div< std::complex< T >, std::complex< T > >, XprLiteral< std::complex< T > >, VectorConstReference< std::complex< T >, Sz > >, Sz > | tvmet::div (const std::complex< T > &lhs, const Vector< std::complex< T >, Sz > &rhs) TVMET_CXX_ALWAYS_INLINE |
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 product. | |
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 norm of a vector v. | |
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 norm) of a vector v. | |
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. |
#define TVMET_DECLARE_MACRO | ( | NAME | ) |
Value:
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_DECLARE_MACRO | ( | NAME, | |||
POD | ) |
Value:
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 | ) |
#define TVMET_IMPLEMENT_MACRO | ( | NAME | ) |
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |||
POD | ) |
#define TVMET_IMPLEMENT_MACRO | ( | NAME | ) |
Author: |