upgrade_val< T1, T2 > Struct Template Reference
[Traits]

upgrade_val is used to ensure an operation such as multiplication is possible between two types. values are upgraded only where necessary. used by: glue_div::apply_mixed(), glue_minus::apply_mixed(), glue_plus::apply_mixed(), glue_schur::apply_mixed() and glue_times::apply_mixed() via gemm_mixed(). More...

#include <traits.hpp>

List of all members.

Public Types

typedef promote_type< T1, T2 >
::result 
T1_result
typedef promote_type< T1, T2 >
::result 
T2_result

Static Public Member Functions

static arma_inline const
promote_type< T1, T2 >::result 
apply (const T1 x)
static arma_inline const
promote_type< T1, T2 >::result 
apply (const T2 x)


Detailed Description

template<typename T1, typename T2>
struct upgrade_val< T1, T2 >

upgrade_val is used to ensure an operation such as multiplication is possible between two types. values are upgraded only where necessary. used by: glue_div::apply_mixed(), glue_minus::apply_mixed(), glue_plus::apply_mixed(), glue_schur::apply_mixed() and glue_times::apply_mixed() via gemm_mixed().

Definition at line 628 of file traits.hpp.


Member Typedef Documentation

template<typename T1 , typename T2 >
typedef promote_type<T1,T2>::result upgrade_val< T1, T2 >::T1_result

Definition at line 630 of file traits.hpp.

template<typename T1 , typename T2 >
typedef promote_type<T1,T2>::result upgrade_val< T1, T2 >::T2_result

Definition at line 631 of file traits.hpp.


Member Function Documentation

template<typename T1 , typename T2 >
static arma_inline const promote_type<T1,T2>::result upgrade_val< T1, T2 >::apply ( const T1  x  )  [inline, static]

Definition at line 636 of file traits.hpp.

00637     {
00638     typedef typename promote_type<T1,T2>::result out_type;
00639     return out_type(x);
00640     }

template<typename T1 , typename T2 >
static arma_inline const promote_type<T1,T2>::result upgrade_val< T1, T2 >::apply ( const T2  x  )  [inline, static]

Definition at line 645 of file traits.hpp.

00646     {
00647     typedef typename promote_type<T1,T2>::result out_type;
00648     return out_type(x);
00649     }