|
|
@ -378,6 +378,14 @@ public: |
|
|
|
Vec(const Vec<_Tp, cn>& v); |
|
|
|
Vec(const Vec<_Tp, cn>& v); |
|
|
|
|
|
|
|
|
|
|
|
static Vec all(_Tp alpha); |
|
|
|
static Vec all(_Tp alpha); |
|
|
|
|
|
|
|
static Vec ones(); |
|
|
|
|
|
|
|
static Vec randn(_Tp a, _Tp b); |
|
|
|
|
|
|
|
static Vec randu(_Tp a, _Tp b); |
|
|
|
|
|
|
|
static Vec zeros(); |
|
|
|
|
|
|
|
#ifdef CV_CXX11 |
|
|
|
|
|
|
|
static Vec diag(_Tp alpha) = delete; |
|
|
|
|
|
|
|
static Vec eye() = delete; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
//! per-element multiplication
|
|
|
|
//! per-element multiplication
|
|
|
|
Vec mul(const Vec<_Tp, cn>& v) const; |
|
|
|
Vec mul(const Vec<_Tp, cn>& v) const; |
|
|
@ -1063,6 +1071,18 @@ Vec<_Tp, cn> Vec<_Tp, cn>::all(_Tp alpha) |
|
|
|
return v; |
|
|
|
return v; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename _Tp, int cn> inline |
|
|
|
|
|
|
|
Vec<_Tp, cn> Vec<_Tp, cn>::ones() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return Vec::all(1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename _Tp, int cn> inline |
|
|
|
|
|
|
|
Vec<_Tp, cn> Vec<_Tp, cn>::zeros() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return Vec::all(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<typename _Tp, int cn> inline |
|
|
|
template<typename _Tp, int cn> inline |
|
|
|
Vec<_Tp, cn> Vec<_Tp, cn>::mul(const Vec<_Tp, cn>& v) const |
|
|
|
Vec<_Tp, cn> Vec<_Tp, cn>::mul(const Vec<_Tp, cn>& v) const |
|
|
|
{ |
|
|
|
{ |
|
|
|