|
|
|
@ -1275,6 +1275,48 @@ Matx<_Tp, m, n> operator * (double alpha, const Matx<_Tp, m, n>& a) |
|
|
|
|
return Matx<_Tp, m, n>(a, alpha, Matx_ScaleOp()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, int m, int n> static inline |
|
|
|
|
Matx<_Tp, m, n>& operator /= (Matx<_Tp, m, n>& a, int alpha) |
|
|
|
|
{ |
|
|
|
|
for( int i = 0; i < m*n; i++ ) |
|
|
|
|
a.val[i] = saturate_cast<_Tp>(a.val[i] / alpha); |
|
|
|
|
return a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, int m, int n> static inline |
|
|
|
|
Matx<_Tp, m, n>& operator /= (Matx<_Tp, m, n>& a, float alpha) |
|
|
|
|
{ |
|
|
|
|
for( int i = 0; i < m*n; i++ ) |
|
|
|
|
a.val[i] = saturate_cast<_Tp>(a.val[i] / alpha); |
|
|
|
|
return a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, int m, int n> static inline |
|
|
|
|
Matx<_Tp, m, n>& operator /= (Matx<_Tp, m, n>& a, double alpha) |
|
|
|
|
{ |
|
|
|
|
for( int i = 0; i < m*n; i++ ) |
|
|
|
|
a.val[i] = saturate_cast<_Tp>(a.val[i] / alpha); |
|
|
|
|
return a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, int m, int n> static inline |
|
|
|
|
Matx<_Tp, m, n> operator / (const Matx<_Tp, m, n>& a, int alpha) |
|
|
|
|
{ |
|
|
|
|
return Matx<_Tp, m, n>(a, 1./alpha, Matx_ScaleOp()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, int m, int n> static inline |
|
|
|
|
Matx<_Tp, m, n> operator / (const Matx<_Tp, m, n>& a, float alpha) |
|
|
|
|
{ |
|
|
|
|
return Matx<_Tp, m, n>(a, 1.f/alpha, Matx_ScaleOp()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, int m, int n> static inline |
|
|
|
|
Matx<_Tp, m, n> operator / (const Matx<_Tp, m, n>& a, double alpha) |
|
|
|
|
{ |
|
|
|
|
return Matx<_Tp, m, n>(a, 1./alpha, Matx_ScaleOp()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, int m, int n> static inline |
|
|
|
|
Matx<_Tp, m, n> operator - (const Matx<_Tp, m, n>& a) |
|
|
|
|
{ |
|
|
|
|