From 414efa47d3e37a15ef681f86425778fbf3a09c27 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Mon, 8 Feb 2016 08:50:34 -0800 Subject: [PATCH] Add missing calls to tests of COD. Fix a few mistakes in 3.2 -> 3.3 port. --- Eigen/src/QR/CompleteOrthogonalDecomposition.h | 4 ++-- test/qr_colpivoting.cpp | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Eigen/src/QR/CompleteOrthogonalDecomposition.h b/Eigen/src/QR/CompleteOrthogonalDecomposition.h index b81bb7433..4095e79e5 100644 --- a/Eigen/src/QR/CompleteOrthogonalDecomposition.h +++ b/Eigen/src/QR/CompleteOrthogonalDecomposition.h @@ -480,7 +480,7 @@ template template void CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl( const RhsType& rhs, DstType& dst) const { - eigen_assert(rhs().rows() == this->rows()); + eigen_assert(rhs.rows() == this->rows()); const Index rank = this->rank(); if (rank == 0) { @@ -491,7 +491,7 @@ void CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl( // Compute c = Q^* * rhs // Note that the matrix Q = H_0^* H_1^*... so its inverse is // Q^* = (H_0 H_1 ...)^T - typename RhsType::PlainObject c(rhs()); + typename RhsType::PlainObject c(rhs); c.applyOnTheLeft( householderSequence(matrixQTZ(), hCoeffs()).setLength(rank).transpose()); diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp index 648250af6..16f80d8b5 100644 --- a/test/qr_colpivoting.cpp +++ b/test/qr_colpivoting.cpp @@ -289,6 +289,15 @@ void test_qr_colpivoting() CALL_SUBTEST_5(( qr_fixedsize, 1 >() )); } + for(int i = 0; i < g_repeat; i++) { + CALL_SUBTEST_1( cod() ); + CALL_SUBTEST_2( cod() ); + CALL_SUBTEST_3( cod() ); + CALL_SUBTEST_4(( cod_fixedsize, 4 >() )); + CALL_SUBTEST_5(( cod_fixedsize, 3 >() )); + CALL_SUBTEST_5(( cod_fixedsize, 1 >() )); + } + for(int i = 0; i < g_repeat; i++) { CALL_SUBTEST_1( qr_invertible() ); CALL_SUBTEST_2( qr_invertible() );