mirror of https://github.com/davisking/dlib.git
Merge pull request #78 from ernestotapiar/issue_orthogonalize
orthogonalize does not work with fixed-sized matrices
This commit is contained in:
commit
1af517bcf0
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue