added Vec Matx::solve(Vec) (ticket #1376)
This commit is contained in:
@@ -502,7 +502,7 @@ public:
|
||||
|
||||
//! solve linear system
|
||||
template<int l> Matx<_Tp, n, l> solve(const Matx<_Tp, m, l>& rhs, int flags=DECOMP_LU) const;
|
||||
Matx<_Tp, n, 1> solve(const Matx<_Tp, m, 1>& rhs, int method) const;
|
||||
Vec<_Tp, n> solve(const Vec<_Tp, m>& rhs, int method) const;
|
||||
|
||||
//! multiply two matrices element-wise
|
||||
Matx<_Tp, m, n> mul(const Matx<_Tp, m, n>& a) const;
|
||||
|
@@ -903,6 +903,12 @@ Matx<_Tp, n, l> Matx<_Tp, m, n>::solve(const Matx<_Tp, m, l>& rhs, int method) c
|
||||
return ok ? x : Matx<_Tp, n, l>::zeros();
|
||||
}
|
||||
|
||||
template<typename _Tp, int m, int n> inline
|
||||
Vec<_Tp, n> Matx<_Tp, m, n>::solve(const Vec<_Tp, m>& rhs, int method) const
|
||||
{
|
||||
Matx<_Tp, n, 1> x = solve(reinterpret_cast<const Matx<_Tp, m, 1>&>(rhs), method);
|
||||
return reinterpret_cast<Vec<_Tp, n>&>(x);
|
||||
}
|
||||
|
||||
template<typename _Tp, typename _AccTp> static inline
|
||||
_AccTp normL2Sqr(const _Tp* a, int n)
|
||||
|
Reference in New Issue
Block a user