MyraMath
sytrf_singular


Source: tests/dense/sytrf_singular.cpp

1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
11 // Containers.
12 #include <myramath/dense/Matrix.h>
14 
15 // Algorithms.
16 #include <myramath/dense/sytrf.h>
17 
18 // Reporting.
19 #include <tests/myratest.h>
20 
21 using namespace myra;
22 
23 ADD_TEST("sytrf_singular","[dense][lapack]")
24  {
25  // Make random A ..
26  auto A = Matrix<double>::random(5,5);
27  A = A+transpose(A);
28  // .. make singular, third row/column is all zero.
29  A.column(3).zero();
30  A.row(3).zero();
31  REQUIRE_EXCEPTION( sytrf_inplace('L','R',A); );
32  }
33 
static Matrix< Number > random(int I, int J)
Generates a random Matrix of specified size.
Definition: Matrix.cpp:353
Definition: syntax.dox:1
LDL&#39; decompositions for real symmetric Matrix A (indefinite is fine).
Returns a transposed copy of a Matrix. The inplace version only works on a square operand...
General purpose dense matrix container, O(i*j) storage.


Results: [PASS]


Go back to Summary of /test programs.