qr_colpivoting.cpp File Reference
#include "main.h"
#include <Eigen/QR>
#include <Eigen/SVD>
#include "solverbase.h"

Functions

template<typename MatrixType >
void cod ()
 
template<typename MatrixType , int Cols2>
void cod_fixedsize ()
 
template<typename MatrixType >
void qr ()
 
template<typename MatrixType , int Cols2>
void qr_fixedsize ()
 
template<typename MatrixType >
void qr_kahan_matrix ()
 
template<typename MatrixType >
void qr_invertible ()
 
template<typename MatrixType >
void qr_verify_assert ()
 
template<typename MatrixType >
void cod_verify_assert ()
 
 EIGEN_DECLARE_TEST (qr_colpivoting)
 

Function Documentation

◆ cod()

template<typename MatrixType >
void cod ( )
17  {
18  Index rows = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
19  Index cols = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
20  Index cols2 = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
21  Index rank = internal::random<Index>(1, (std::min)(rows, cols) - 1);
22 
23  typedef typename MatrixType::Scalar Scalar;
24  typedef typename MatrixType::RealScalar RealScalar;
29  VERIFY(rank == cod.rank());
30  VERIFY(cols - cod.rank() == cod.dimensionOfKernel());
31  VERIFY(!cod.isInjective());
32  VERIFY(!cod.isInvertible());
33  VERIFY(!cod.isSurjective());
34 
35  MatrixQType q = cod.householderQ();
37 
38  MatrixType z = cod.matrixZ();
40 
41  MatrixType t;
42  t.setZero(rows, cols);
43  t.topLeftCorner(rank, rank) = cod.matrixT().topLeftCorner(rank, rank).template triangularView<Upper>();
44 
45  MatrixType c = q * t * z * cod.colsPermutation().inverse();
47 
48  check_solverbase<MatrixType, MatrixType>(matrix, cod, rows, cols, cols2);
49 
50  // Verify that we get the same minimum-norm solution as the SVD.
51  MatrixType exact_solution = MatrixType::Random(cols, cols2);
53  MatrixType cod_solution = cod.solve(rhs);
55  MatrixType svd_solution = svd.solve(rhs);
56  VERIFY_IS_APPROX(cod_solution, svd_solution);
57 
58  MatrixType pinv = cod.pseudoInverse();
59  VERIFY_IS_APPROX(cod_solution, pinv * rhs);
60 
61  // now construct a (square) matrix with prescribed determinant
62  Index size = internal::random<Index>(2, 20);
63  matrix.setZero(size, size);
64  for (int i = 0; i < size; i++) {
65  matrix(i, i) = internal::random<Scalar>();
66  }
67  Scalar det = matrix.diagonal().prod();
68  RealScalar absdet = numext::abs(det);
70  cod2.compute(matrix);
71  q = cod2.householderQ();
72  matrix = q * matrix * q.adjoint();
73  VERIFY_IS_APPROX(det, cod2.determinant());
74  VERIFY_IS_APPROX(absdet, cod2.absDeterminant());
75  VERIFY_IS_APPROX(numext::log(absdet), cod2.logAbsDeterminant());
76  VERIFY_IS_APPROX(numext::sign(det), cod2.signDeterminant());
77 }
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
int i
Definition: BiCGSTAB_step_by_step.cpp:9
cout<< "Here is the matrix m:"<< endl<< m<< endl;JacobiSVD< MatrixXf, ComputeThinU|ComputeThinV > svd(m)
int rows
Definition: Tutorial_commainit_02.cpp:1
int cols
Definition: Tutorial_commainit_02.cpp:1
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:46
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
#define EIGEN_TEST_MAX_SIZE
Definition: boostmultiprec.cpp:16
Complete orthogonal decomposition (COD) of a matrix.
Definition: CompleteOrthogonalDecomposition.h:54
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Definition: JacobiSVD.h:500
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor >, 0, Eigen::OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: common.h:85
#define min(a, b)
Definition: datatypes.h:22
#define VERIFY_IS_APPROX(a, b)
Definition: integer_types.cpp:13
#define VERIFY(a)
Definition: main.h:362
#define VERIFY_IS_UNITARY(a)
Definition: main.h:378
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
EIGEN_DEVICE_FUNC const Scalar & q
Definition: SpecialFunctionsImpl.h:2019
void createRandomPIMatrixOfRank(Index desired_rank, Index rows, Index cols, MatrixType &m)
Definition: random_matrix_helper.h:60
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
void exact_solution(const double &time, const Vector< double > &x, Vector< double > &u)
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:203
bool pinv
Definition: jeffery_hamel.cc:86
T sign(T x)
Definition: cxx11_tensor_builtins_sycl.cpp:172
int c
Definition: calibrate.py:100
t
Definition: plotPSD.py:36
void cod()
Definition: qr_colpivoting.cpp:17

References abs(), Eigen::CompleteOrthogonalDecomposition< MatrixType_, PermutationIndex_ >::absDeterminant(), calibrate::c, cols, Eigen::CompleteOrthogonalDecomposition< MatrixType_, PermutationIndex_ >::compute(), Eigen::createRandomPIMatrixOfRank(), Eigen::CompleteOrthogonalDecomposition< MatrixType_, PermutationIndex_ >::determinant(), EIGEN_TEST_MAX_SIZE, Global_Parameters::exact_solution(), Eigen::CompleteOrthogonalDecomposition< MatrixType_, PermutationIndex_ >::householderQ(), i, Eigen::bfloat16_impl::log(), Eigen::CompleteOrthogonalDecomposition< MatrixType_, PermutationIndex_ >::logAbsDeterminant(), matrix(), min, Global_Physical_Variables::pinv, Eigen::numext::q, rows, SYCL::sign(), Eigen::CompleteOrthogonalDecomposition< MatrixType_, PermutationIndex_ >::signDeterminant(), size, svd(), plotPSD::t, VERIFY, VERIFY_IS_APPROX, and VERIFY_IS_UNITARY.

Referenced by bench(), cod_fixedsize(), and cod_verify_assert().

◆ cod_fixedsize()

template<typename MatrixType , int Cols2>
void cod_fixedsize ( )
80  {
81  enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };
82  typedef typename MatrixType::Scalar Scalar;
84  int rank = internal::random<int>(1, (std::min)(int(Rows), int(Cols)) - 1);
86  createRandomPIMatrixOfRank(rank, Rows, Cols, matrix);
87  COD cod(matrix);
88  VERIFY(rank == cod.rank());
89  VERIFY(Cols - cod.rank() == cod.dimensionOfKernel());
90  VERIFY(cod.isInjective() == (rank == Rows));
91  VERIFY(cod.isSurjective() == (rank == Cols));
92  VERIFY(cod.isInvertible() == (cod.isInjective() && cod.isSurjective()));
93 
94  check_solverbase<Matrix<Scalar, Cols, Cols2>, Matrix<Scalar, Rows, Cols2> >(matrix, cod, Rows, Cols, Cols2);
95 
96  // Verify that we get the same minimum-norm solution as the SVD.
98  exact_solution.setRandom(Cols, Cols2);
100  Matrix<Scalar, Cols, Cols2> cod_solution = cod.solve(rhs);
102  Matrix<Scalar, Cols, Cols2> svd_solution = svd.solve(rhs);
103  VERIFY_IS_APPROX(cod_solution, svd_solution);
104 
105  typename Inverse<COD>::PlainObject pinv = cod.pseudoInverse();
106  VERIFY_IS_APPROX(cod_solution, pinv * rhs);
107 }
Expression of the inverse of another expression.
Definition: Inverse.h:43

References cod(), Eigen::createRandomPIMatrixOfRank(), Global_Parameters::exact_solution(), matrix(), min, Global_Physical_Variables::pinv, svd(), VERIFY, and VERIFY_IS_APPROX.

Referenced by EIGEN_DECLARE_TEST().

◆ cod_verify_assert()

template<typename MatrixType >
void cod_verify_assert ( )
311  {
312  MatrixType tmp;
313 
315  VERIFY_RAISES_ASSERT(cod.matrixQTZ())
319  VERIFY_RAISES_ASSERT(cod.householderQ())
320  VERIFY_RAISES_ASSERT(cod.dimensionOfKernel())
321  VERIFY_RAISES_ASSERT(cod.isInjective())
322  VERIFY_RAISES_ASSERT(cod.isSurjective())
323  VERIFY_RAISES_ASSERT(cod.isInvertible())
324  VERIFY_RAISES_ASSERT(cod.pseudoInverse())
326  VERIFY_RAISES_ASSERT(cod.absDeterminant())
327  VERIFY_RAISES_ASSERT(cod.logAbsDeterminant())
328  VERIFY_RAISES_ASSERT(cod.signDeterminant())
329 }
void adjoint(const MatrixType &m)
Definition: adjoint.cpp:85
void determinant(const MatrixType &m)
Definition: determinant.cpp:15
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
#define VERIFY_RAISES_ASSERT(a)
Definition: main.h:329
void transpose()
Definition: skew_symmetric_matrix3.cpp:135
Update the problem specs before solve
Definition: steady_axisym_advection_diffusion.cc:353

References cod(), tmp, and VERIFY_RAISES_ASSERT.

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( qr_colpivoting  )
331  {
332  for (int i = 0; i < g_repeat; i++) {
333  CALL_SUBTEST_1(qr<MatrixXf>());
334  CALL_SUBTEST_2(qr<MatrixXd>());
335  CALL_SUBTEST_3(qr<MatrixXcd>());
339  }
340 
341  for (int i = 0; i < g_repeat; i++) {
342  CALL_SUBTEST_1(cod<MatrixXf>());
343  CALL_SUBTEST_2(cod<MatrixXd>());
344  CALL_SUBTEST_3(cod<MatrixXcd>());
348  }
349 
350  for (int i = 0; i < g_repeat; i++) {
351  CALL_SUBTEST_1(qr_invertible<MatrixXf>());
352  CALL_SUBTEST_2(qr_invertible<MatrixXd>());
353  CALL_SUBTEST_6(qr_invertible<MatrixXcf>());
354  CALL_SUBTEST_3(qr_invertible<MatrixXcd>());
355  }
356 
357  CALL_SUBTEST_7(qr_verify_assert<Matrix3f>());
358  CALL_SUBTEST_8(qr_verify_assert<Matrix3d>());
359  CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());
360  CALL_SUBTEST_2(qr_verify_assert<MatrixXd>());
361  CALL_SUBTEST_6(qr_verify_assert<MatrixXcf>());
362  CALL_SUBTEST_3(qr_verify_assert<MatrixXcd>());
363 
364  CALL_SUBTEST_7(cod_verify_assert<Matrix3f>());
365  CALL_SUBTEST_8(cod_verify_assert<Matrix3d>());
366  CALL_SUBTEST_1(cod_verify_assert<MatrixXf>());
367  CALL_SUBTEST_2(cod_verify_assert<MatrixXd>());
368  CALL_SUBTEST_6(cod_verify_assert<MatrixXcf>());
369  CALL_SUBTEST_3(cod_verify_assert<MatrixXcd>());
370 
371  // Test problem size constructors
373 
374  CALL_SUBTEST_1(qr_kahan_matrix<MatrixXf>());
375  CALL_SUBTEST_2(qr_kahan_matrix<MatrixXd>());
376 }
Householder rank-revealing QR decomposition of a matrix with column-pivoting.
Definition: ColPivHouseholderQR.h:54
static int g_repeat
Definition: main.h:191
void qr_fixedsize()
Definition: qr_colpivoting.cpp:169
void cod_fixedsize()
Definition: qr_colpivoting.cpp:80
#define CALL_SUBTEST_6(FUNC)
Definition: split_test_helper.h:34
#define CALL_SUBTEST_3(FUNC)
Definition: split_test_helper.h:16
#define CALL_SUBTEST_1(FUNC)
Definition: split_test_helper.h:4
#define CALL_SUBTEST_8(FUNC)
Definition: split_test_helper.h:46
#define CALL_SUBTEST_5(FUNC)
Definition: split_test_helper.h:28
#define CALL_SUBTEST_2(FUNC)
Definition: split_test_helper.h:10
#define CALL_SUBTEST_7(FUNC)
Definition: split_test_helper.h:40
#define CALL_SUBTEST_4(FUNC)
Definition: split_test_helper.h:22
#define CALL_SUBTEST_9(FUNC)
Definition: split_test_helper.h:52

References CALL_SUBTEST_1, CALL_SUBTEST_2, CALL_SUBTEST_3, CALL_SUBTEST_4, CALL_SUBTEST_5, CALL_SUBTEST_6, CALL_SUBTEST_7, CALL_SUBTEST_8, CALL_SUBTEST_9, cod_fixedsize(), Eigen::g_repeat, i, and qr_fixedsize().

◆ qr()

template<typename MatrixType >
void qr ( )
110  {
111  using std::sqrt;
112 
113  Index rows = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE), cols = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE),
114  cols2 = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
115  Index rank = internal::random<Index>(1, (std::min)(rows, cols) - 1);
116 
117  typedef typename MatrixType::Scalar Scalar;
118  typedef typename MatrixType::RealScalar RealScalar;
120  MatrixType m1;
123  VERIFY_IS_EQUAL(rank, qr.rank());
124  VERIFY_IS_EQUAL(cols - qr.rank(), qr.dimensionOfKernel());
125  VERIFY(!qr.isInjective());
126  VERIFY(!qr.isInvertible());
127  VERIFY(!qr.isSurjective());
128 
129  MatrixQType q = qr.householderQ();
131 
132  MatrixType r = qr.matrixQR().template triangularView<Upper>();
133  MatrixType c = q * r * qr.colsPermutation().inverse();
135 
136  // Verify that the absolute value of the diagonal elements in R are
137  // non-increasing until they reach the singularity threshold.
139  for (Index i = 0; i < (std::min)(rows, cols) - 1; ++i) {
140  RealScalar x = numext::abs(r(i, i));
141  RealScalar y = numext::abs(r(i + 1, i + 1));
142  if (x < threshold && y < threshold) continue;
143  if (!test_isApproxOrLessThan(y, x)) {
144  for (Index j = 0; j < (std::min)(rows, cols); ++j) {
145  std::cout << "i = " << j << ", |r_ii| = " << numext::abs(r(j, j)) << std::endl;
146  }
147  std::cout << "Failure at i=" << i << ", rank=" << rank << ", threshold=" << threshold << std::endl;
148  }
150  }
151 
152  check_solverbase<MatrixType, MatrixType>(m1, qr, rows, cols, cols2);
153 
154  {
155  MatrixType m2, m3;
156  Index size = rows;
157  do {
158  m1 = MatrixType::Random(size, size);
159  qr.compute(m1);
160  } while (!qr.isInvertible());
161  MatrixType m1_inv = qr.inverse();
162  m3 = m1 * MatrixType::Random(size, cols2);
163  m2 = qr.solve(m3);
164  VERIFY_IS_APPROX(m2, m1_inv * m3);
165  }
166 }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Matrix3d m1
Definition: IOFormat.cpp:2
MatrixType m2(n_dims)
Scalar * y
Definition: level1_cplx_impl.h:128
#define VERIFY_IS_EQUAL(a, b)
Definition: main.h:367
#define VERIFY_IS_APPROX_OR_LESS_THAN(a, b)
Definition: main.h:373
r
Definition: UniformPSDSelfTest.py:20
bool test_isApproxOrLessThan(const Real &a, const Real &b)
Definition: boostmultiprec.cpp:130
double epsilon
Definition: osc_ring_sarah_asymptotics.h:43
list x
Definition: plotDoE.py:28
void qr()
Definition: qr_colpivoting.cpp:110
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References abs(), calibrate::c, cols, Eigen::createRandomPIMatrixOfRank(), EIGEN_TEST_MAX_SIZE, oomph::SarahBL::epsilon, i, j, m1, m2(), min, Eigen::numext::q, UniformPSDSelfTest::r, rows, size, sqrt(), boost::multiprecision::test_isApproxOrLessThan(), VERIFY, VERIFY_IS_APPROX, VERIFY_IS_APPROX_OR_LESS_THAN, VERIFY_IS_EQUAL, VERIFY_IS_UNITARY, plotDoE::x, and y.

Referenced by qr_fixedsize(), qr_invertible(), qr_kahan_matrix(), and qr_verify_assert().

◆ qr_fixedsize()

template<typename MatrixType , int Cols2>
void qr_fixedsize ( )
169  {
170  using std::abs;
171  using std::sqrt;
172  enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };
173  typedef typename MatrixType::Scalar Scalar;
174  typedef typename MatrixType::RealScalar RealScalar;
175  int rank = internal::random<int>(1, (std::min)(int(Rows), int(Cols)) - 1);
177  createRandomPIMatrixOfRank(rank, Rows, Cols, m1);
179  VERIFY_IS_EQUAL(rank, qr.rank());
180  VERIFY_IS_EQUAL(Cols - qr.rank(), qr.dimensionOfKernel());
181  VERIFY_IS_EQUAL(qr.isInjective(), (rank == Rows));
182  VERIFY_IS_EQUAL(qr.isSurjective(), (rank == Cols));
183  VERIFY_IS_EQUAL(qr.isInvertible(), (qr.isInjective() && qr.isSurjective()));
184 
185  Matrix<Scalar, Rows, Cols> r = qr.matrixQR().template triangularView<Upper>();
186  Matrix<Scalar, Rows, Cols> c = qr.householderQ() * r * qr.colsPermutation().inverse();
188 
189  check_solverbase<Matrix<Scalar, Cols, Cols2>, Matrix<Scalar, Rows, Cols2> >(m1, qr, Rows, Cols, Cols2);
190 
191  // Verify that the absolute value of the diagonal elements in R are
192  // non-increasing until they reache the singularity threshold.
193  RealScalar threshold = sqrt(RealScalar(Rows)) * (std::abs)(r(0, 0)) * NumTraits<Scalar>::epsilon();
194  for (Index i = 0; i < (std::min)(int(Rows), int(Cols)) - 1; ++i) {
195  RealScalar x = numext::abs(r(i, i));
196  RealScalar y = numext::abs(r(i + 1, i + 1));
197  if (x < threshold && y < threshold) continue;
198  if (!test_isApproxOrLessThan(y, x)) {
199  for (Index j = 0; j < (std::min)(int(Rows), int(Cols)); ++j) {
200  std::cout << "i = " << j << ", |r_ii| = " << numext::abs(r(j, j)) << std::endl;
201  }
202  std::cout << "Failure at i=" << i << ", rank=" << rank << ", threshold=" << threshold << std::endl;
203  }
205  }
206 }
return int(ret)+1
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217

References abs(), calibrate::c, Eigen::createRandomPIMatrixOfRank(), i, int(), j, m1, min, qr(), UniformPSDSelfTest::r, sqrt(), boost::multiprecision::test_isApproxOrLessThan(), VERIFY_IS_APPROX, VERIFY_IS_APPROX_OR_LESS_THAN, VERIFY_IS_EQUAL, plotDoE::x, and y.

Referenced by EIGEN_DECLARE_TEST().

◆ qr_invertible()

template<typename MatrixType >
void qr_invertible ( )
254  {
255  using std::abs;
256  using std::log;
258  typedef typename MatrixType::Scalar Scalar;
259 
260  int size = internal::random<int>(10, 50);
261 
262  MatrixType m1(size, size), m2(size, size), m3(size, size);
263  m1 = MatrixType::Random(size, size);
264 
266  // let's build a matrix more stable to inverse
267  MatrixType a = MatrixType::Random(size, size * 2);
268  m1 += a * a.adjoint();
269  }
270 
272 
273  check_solverbase<MatrixType, MatrixType>(m1, qr, size, size, size);
274 
275  // now construct a matrix with prescribed determinant
276  m1.setZero();
277  for (int i = 0; i < size; i++) m1(i, i) = internal::random<Scalar>();
278  Scalar det = m1.diagonal().prod();
279  RealScalar absdet = abs(det);
280  m3 = qr.householderQ(); // get a unitary
281  m1 = m3 * m1 * m3.adjoint();
282  qr.compute(m1);
283  VERIFY_IS_APPROX(det, qr.determinant());
284  VERIFY_IS_APPROX(absdet, qr.absDeterminant());
285  VERIFY_IS_APPROX(log(absdet), qr.logAbsDeterminant());
286  VERIFY_IS_APPROX(numext::sign(det), qr.signDeterminant());
287 }
const Scalar * a
Definition: level2_cplx_impl.h:32
squared absolute value
Definition: GlobalFunctions.h:87

References a, abs(), i, Eigen::bfloat16_impl::log(), m1, m2(), qr(), SYCL::sign(), size, Eigen::value, and VERIFY_IS_APPROX.

◆ qr_kahan_matrix()

template<typename MatrixType >
void qr_kahan_matrix ( )
216  {
217  using std::abs;
218  using std::sqrt;
219  typedef typename MatrixType::Scalar Scalar;
220  typedef typename MatrixType::RealScalar RealScalar;
221 
222  Index rows = 300, cols = rows;
223 
224  MatrixType m1;
225  m1.setZero(rows, cols);
227  RealScalar c = std::sqrt(1 - s * s);
228  RealScalar pow_s_i(1.0); // pow(s,i)
229  for (Index i = 0; i < rows; ++i) {
230  m1(i, i) = pow_s_i;
231  m1.row(i).tail(rows - i - 1) = -pow_s_i * c * MatrixType::Ones(1, rows - i - 1);
232  pow_s_i *= s;
233  }
234  m1 = (m1 + m1.transpose()).eval();
236  MatrixType r = qr.matrixQR().template triangularView<Upper>();
237 
239  for (Index i = 0; i < (std::min)(rows, cols) - 1; ++i) {
240  RealScalar x = numext::abs(r(i, i));
241  RealScalar y = numext::abs(r(i + 1, i + 1));
242  if (x < threshold && y < threshold) continue;
243  if (!test_isApproxOrLessThan(y, x)) {
244  for (Index j = 0; j < (std::min)(rows, cols); ++j) {
245  std::cout << "i = " << j << ", |r_ii| = " << numext::abs(r(j, j)) << std::endl;
246  }
247  std::cout << "Failure at i=" << i << ", rank=" << qr.rank() << ", threshold=" << threshold << std::endl;
248  }
250  }
251 }
RealScalar s
Definition: level1_cplx_impl.h:130
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Definition: sparse_permutations.cpp:47

References abs(), calibrate::c, cols, oomph::SarahBL::epsilon, eval(), i, j, m1, min, Eigen::bfloat16_impl::pow(), qr(), UniformPSDSelfTest::r, rows, s, sqrt(), boost::multiprecision::test_isApproxOrLessThan(), VERIFY_IS_APPROX_OR_LESS_THAN, plotDoE::x, and y.

◆ qr_verify_assert()

template<typename MatrixType >
void qr_verify_assert ( )
290  {
291  MatrixType tmp;
292 
294  VERIFY_RAISES_ASSERT(qr.matrixQR())
298  VERIFY_RAISES_ASSERT(qr.householderQ())
299  VERIFY_RAISES_ASSERT(qr.dimensionOfKernel())
300  VERIFY_RAISES_ASSERT(qr.isInjective())
301  VERIFY_RAISES_ASSERT(qr.isSurjective())
302  VERIFY_RAISES_ASSERT(qr.isInvertible())
305  VERIFY_RAISES_ASSERT(qr.absDeterminant())
306  VERIFY_RAISES_ASSERT(qr.logAbsDeterminant())
307  VERIFY_RAISES_ASSERT(qr.signDeterminant())
308 }
void inverse(const MatrixType &m)
Definition: inverse.cpp:64

References qr(), tmp, and VERIFY_RAISES_ASSERT.