14 #ifndef _GENERICARITHMETICI_H_ 15 #define _GENERICARITHMETICI_H_ 24 template<
typename ScalarT,
typename SelfT>
bool 27 return m_child->operatorCompare( rhs, std::less<ScalarT>() );
30 template<
typename ScalarT,
typename SelfT>
bool 33 return m_child->operatorCompare( rhs, std::greater<ScalarT>() );
36 template<
typename ScalarT,
typename SelfT>
bool 39 return m_child->operatorCompare( rhs, std::less_equal<ScalarT>() );
42 template<
typename ScalarT,
typename SelfT>
bool 45 return m_child->operatorCompare( rhs, std::greater_equal<ScalarT>() );
51 template<
typename ScalarT,
typename SelfT> SelfT&
54 return m_child->operatorOpEquals( rhs, std::plus<ScalarT>() );
57 template<
typename ScalarT,
typename SelfT> SelfT&
60 return m_child->operatorOpEquals( a, std::plus<ScalarT>() );
63 template<
typename ScalarT,
typename SelfT> SelfT&
66 return m_child->operatorOpEquals( rhs, std::minus<ScalarT>() );
69 template<
typename ScalarT,
typename SelfT> SelfT&
72 return m_child->operatorOpEquals( a, std::minus<ScalarT>() );
75 template<
typename ScalarT,
typename SelfT> SelfT&
78 return m_child->operatorOpEquals( rhs, std::multiplies<ScalarT>() );
81 template<
typename ScalarT,
typename SelfT> SelfT&
84 return m_child->operatorOpEquals( a, std::multiplies<ScalarT>() );
87 template<
typename ScalarT,
typename SelfT> SelfT&
90 return m_child->operatorOpEquals( rhs, std::divides<ScalarT>() );
93 template<
typename ScalarT,
typename SelfT> SelfT&
96 return m_child->operatorOpEquals( a, std::divides<ScalarT>() );
110 C& (
C::*op)(
const typename C::scalar_type&) )
120 template<
class C>
typename C::self_type
operator+(
const C& c1,
const C& c2 )
122 return operatorOp< C >( c1, c2, &C::operator+= );
124 template<
class C>
typename C::self_type
operator-(
const C& c1,
const C& c2 )
126 return operatorOp< C >( c1, c2, &C::operator-= );
128 template<
class C>
typename C::self_type
operator*(
const C& c1,
const C& c2 )
130 return operatorOp< C >( c1, c2, &C::operator*= );
132 template<
class C>
typename C::self_type
operator/(
const C& c1,
const C& c2 )
134 return operatorOp< C >( c1, c2, &C::operator/= );
140 template<
class C>
typename C::self_type
operator+(
const C& c,
const typename C::scalar_type& x )
142 return operatorOpScalar<C>( c, x, &C::operator+= );
144 template<
class C>
typename C::self_type
operator+(
const typename C::scalar_type& x,
const C& c )
149 template<
class C>
typename C::self_type
operator*(
const C& c,
const typename C::scalar_type& x )
151 return operatorOpScalar<C>( c, x, &C::operator*= );
153 template<
class C>
typename C::self_type
operator*(
const typename C::scalar_type& x,
const C& c )
158 template<
class C>
typename C::self_type
operator-(
const C& c,
const typename C::scalar_type& x )
160 return operatorOpScalar<C>( c, x, &C::operator-= );
162 template<
class C>
typename C::self_type
operator-(
const typename C::scalar_type& x,
const C& c )
168 template<
class C>
typename C::self_type
operator/(
const C& c,
const typename C::scalar_type& x )
170 return operatorOpScalar<C>( c, x, &C::operator/= );
172 template<
class C>
typename C::self_type
operator/(
const typename C::scalar_type& x,
const C& c )
175 return temp.reciprocal() * x;
182 #endif // include guard bool operator>(const SelfT &) const
Definition: GenericArithmeticI.H:31
bool operator<(const SelfT &) const
Definition: GenericArithmeticI.H:25
bool operator>=(const SelfT &) const
Definition: GenericArithmeticI.H:43
void const char const int const int const int const Real const Real const int const Real const int const Real Real * C
Definition: Lapack.H:83
SelfT & operator+=(const SelfT &)
Definition: GenericArithmeticI.H:52
C::self_type operator/(const C &c1, const C &c2)
Definition: GenericArithmeticI.H:132
C::self_type operator*(const C &c1, const C &c2)
Definition: GenericArithmeticI.H:128
C::self_type operator-(const C &c1, const C &c2)
Definition: GenericArithmeticI.H:124
C::self_type operator+(const C &c1, const C &c2)
Definition: GenericArithmeticI.H:120
C operatorOpScalar(const C &c1, const typename C::scalar_type &x, C &(C::*op)(const typename C::scalar_type &))
Definition: GenericArithmeticI.H:109
bool operator<=(const SelfT &) const
Definition: GenericArithmeticI.H:37
SelfT & operator*=(const SelfT &)
Definition: GenericArithmeticI.H:76
SelfT & operator/=(const SelfT &)
Definition: GenericArithmeticI.H:88
SelfT & operator-=(const SelfT &)
Definition: GenericArithmeticI.H:64
C operatorOp(const C &c1, const C &c2, C &(C::*op)(const C &))
Definition: GenericArithmeticI.H:100