ug4
template_expressions.h File Reference

Go to the source code of this file.

Classes

class  ug::AlphaMat_Expression< R >
 
class  ug::AlphaMatVec_X_Expression< L, operation, R >
 
class  ug::AlphaVec_Expression< R >
 
class  ug::MatVec_Expression< L, R >
 
struct  ug::operation_add
 
struct  ug::operation_sub
 
class  ug::TE_AMV_X< A >
 
class  ug::TRANSPOSED< A >
 this helper class is a transposed of class A More...
 

Namespaces

 ug
 the ug namespace
 

Macros

#define MAKE_TEMPLATE_OPERATORS_MATRIX(MATRIX_TYPE)
 
#define MAKE_TEMPLATE_OPERATORS_MATRIX2(TEMPLATE_DEFINITION, MATRIX_TYPE)
 
#define MAKE_TEMPLATE_OPERATORS_VECTOR(VECTOR_TYPE)
 
#define MAKE_TEMPLATE_OPERATORS_VECTOR2(TEMPLATE_DEFINITION, VECTOR_TYPE)
 

Functions

template<typename T >
double ug::getScaling (const AlphaVec_Expression< T > &t)
 
template<typename T >
double ug::getScaling (const T &t)
 
template<typename T >
const T & ug::getVector (const AlphaVec_Expression< T > &t)
 
template<typename T >
const T & ug::getVector (const T &t)
 
template<typename L , typename R >
MatVec_Expression< L, R > ug::operator* (const AlphaMat_Expression< L > &l, const R &r)
 create a MatVec_Expression by (alpha*MATRIX) * VECTOR More...
 
template<typename L , typename R >
AlphaMatVec_X_Expression< L, operation_add, R > ug::operator+ (const TE_AMV_X< L > &l, const TE_AMV_X< R > &r)
 create AlphaMatVec_X_Expression<L, operation_add, R> by conjunction of TE_AMV_X<L> + TE_AMV_X<R> More...
 
template<typename L , typename R >
AlphaMatVec_X_Expression< L, operation_sub, R > ug::operator- (const TE_AMV_X< L > &l, const TE_AMV_X< R > &r)
 create AlphaMatVec_X_Expression<L, operation_minus, R> by conjunction of TE_AMV_X<L> + TE_AMV_X<R> More...
 

Macro Definition Documentation

◆ MAKE_TEMPLATE_OPERATORS_MATRIX

#define MAKE_TEMPLATE_OPERATORS_MATRIX (   MATRIX_TYPE)
Value:
AlphaMat_Expression <MATRIX_TYPE> operator * (double d, const MATRIX_TYPE &r) \
{ \
return AlphaMat_Expression <MATRIX_TYPE> (d, r.cast()); \
} \
template<typename R> \
MatVec_Expression<MATRIX_TYPE, R> operator * (const MATRIX_TYPE &l, const R &r) \
{ \
return MatVec_Expression<MATRIX_TYPE, R> (1.0, l, r); \
}
MatVec_Expression< L, R > operator*(const AlphaMat_Expression< L > &l, const R &r)
create a MatVec_Expression by (alpha*MATRIX) * VECTOR
Definition: template_expressions.h:223

◆ MAKE_TEMPLATE_OPERATORS_MATRIX2

#define MAKE_TEMPLATE_OPERATORS_MATRIX2 (   TEMPLATE_DEFINITION,
  MATRIX_TYPE 
)
Value:
template<TEMPLATE_DEFINITION> \
AlphaMat_Expression <MATRIX_TYPE> operator * (double d, const MATRIX_TYPE &r) \
{ \
return AlphaMat_Expression <MATRIX_TYPE> (d, r.cast()); \
} \
template<TEMPLATE_DEFINITION, typename R> \
MatVec_Expression<MATRIX_TYPE, R> operator * (const MATRIX_TYPE &l, const R &r) \
{ \
return MatVec_Expression<MATRIX_TYPE, R> (1.0, l, r); \
}

◆ MAKE_TEMPLATE_OPERATORS_VECTOR

#define MAKE_TEMPLATE_OPERATORS_VECTOR (   VECTOR_TYPE)
Value:
AlphaVec_Expression<VECTOR_TYPE> operator * (double d, const VECTOR_TYPE &r) \
{ \
return AlphaVec_Expression<VECTOR_TYPE> (d, r); \
} \
template<typename L> \
AlphaMatVec_X_Expression<L, operation_add, VECTOR_TYPE> operator + (const L &l, const VECTOR_TYPE &r) \
{ \
return AlphaMatVec_X_Expression<L, operation_add, VECTOR_TYPE > (l, r); \
} \
template<typename L> \
AlphaMatVec_X_Expression<L, operation_sub, VECTOR_TYPE> operator - (const L &l, const VECTOR_TYPE &r) \
{ \
return AlphaMatVec_X_Expression<L, operation_sub, VECTOR_TYPE > (l, r); \
}
AlphaMatVec_X_Expression< L, operation_sub, R > operator-(const TE_AMV_X< L > &l, const TE_AMV_X< R > &r)
create AlphaMatVec_X_Expression<L, operation_minus, R> by conjunction of TE_AMV_X<L> + TE_AMV_X<R>
Definition: template_expressions.h:215
AlphaMatVec_X_Expression< L, operation_add, R > operator+(const TE_AMV_X< L > &l, const TE_AMV_X< R > &r)
create AlphaMatVec_X_Expression<L, operation_add, R> by conjunction of TE_AMV_X<L> + TE_AMV_X<R>
Definition: template_expressions.h:208

◆ MAKE_TEMPLATE_OPERATORS_VECTOR2

#define MAKE_TEMPLATE_OPERATORS_VECTOR2 (   TEMPLATE_DEFINITION,
  VECTOR_TYPE 
)
Value:
template<TEMPLATE_DEFINITION> \
AlphaVec_Expression<VECTOR_TYPE> operator * (double d, const VECTOR_TYPE &r) \
{ \
return AlphaVec_Expression<VECTOR_TYPE> (d, r); \
} \
template<typename L, TEMPLATE_DEFINITION> \
AlphaMatVec_X_Expression<L, operation_add, VECTOR_TYPE> operator + (const L &l, const VECTOR_TYPE &r) \
{ \
return AlphaMatVec_X_Expression<L, operation_add, VECTOR_TYPE > (l, r); \
} \
template<typename L, TEMPLATE_DEFINITION> \
AlphaMatVec_X_Expression<L, operation_sub, VECTOR_TYPE> operator - (const L &l, const VECTOR_TYPE &r) \
{ \
return AlphaMatVec_X_Expression<L, operation_sub, VECTOR_TYPE > (l, r); \
}