Commit 1af517bc authored by Davis E. King's avatar Davis E. King

Merge pull request #78 from ernestotapiar/issue_orthogonalize

orthogonalize does not work with fixed-sized matrices
parents 4bcecf25 e553b0fc
......@@ -62,8 +62,9 @@ namespace dlib
const matrix_type get_q (
) const;
template <typename T, long R, long C, typename MM, typename L>
void get_q (
matrix_type& Q
matrix<T,R,C,MM,L>& Q
) const;
template <typename EXP>
......@@ -270,9 +271,10 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <typename matrix_exp_type>
template <typename T, long R, long C, typename MM, typename L>
void qr_decomposition<matrix_exp_type>::
get_q(
matrix_type& X
matrix<T,R,C,MM,L>& X
) const
{
#ifdef DLIB_USE_LAPACK
......
......@@ -631,6 +631,16 @@ namespace
3,3,3;
DLIB_TEST(upperbound(m,3) == M);
}
{
matrix<double,9,5> A = randm(9,5);
matrix<double> B = A;
orthogonalize(A);
orthogonalize(B);
DLIB_TEST(equal(A,B));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment