MyraMath
getrf_singular


Source: tests/dense/getrf_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>
13 
14 // Algorithms.
15 #include <myramath/dense/getrf.h>
16 
17 // Reporting.
18 #include <tests/myratest.h>
19 
20 using namespace myra;
21 
22 ADD_TEST("getrf_singular","[dense][lapack]")
23  {
24  // Make singular A, verify getrf(A) throws an exception.
25  auto A = Matrix<double>::random(5,5);
26  A.column(3).zero();
27  REQUIRE_EXCEPTION( auto swaps = getrf_inplace(A); );
28  }
29 
static Matrix< Number > random(int I, int J)
Generates a random Matrix of specified size.
Definition: Matrix.cpp:353
Definition: syntax.dox:1
General purpose dense matrix container, O(i*j) storage.
General purpose A = P&#39;*L*U decomposition for square Matrix&#39;s.


Results: [PASS]


Go back to Summary of /test programs.