30 #include <tests/myratest.h> 39 myra::out() << typestring<Number>() << std::endl;
45 potrf_inplace(
'L',
'R',A);
49 Number alpha = random<Number>();
55 trsm_inplace(
'L',
'N',L,B,diag,alpha);
56 Precision error = frobenius(B-X);
57 myra::out() <<
" |L\\B-X| = " << error << std::endl;
58 REQUIRE(error < tolerance);
64 trsm_inplace(
'L',
'T',L,B,diag,alpha);
65 Precision error = frobenius(B-X);
66 myra::out() <<
" |transpose(L)\\B-X| = " << error << std::endl;
67 REQUIRE(error < tolerance);
73 trsm_inplace(
'L',
'H',L,B,diag,alpha);
74 Precision error = frobenius(B-X);
75 myra::out() <<
" |hermitian(L)\\B-X| = " << error << std::endl;
76 REQUIRE(error < tolerance);
82 trsm_inplace(
'L',
'C',L,B,diag,alpha);
83 Precision error = frobenius(B-X);
84 myra::out() <<
" |conjugate(L)\\B-X| = " << error << std::endl;
85 REQUIRE(error < tolerance);
91 trsm_inplace(
'R',
'N',L,B,diag,alpha);
92 Precision error = frobenius(B-X);
93 myra::out() <<
" |B/L-X| = " << error << std::endl;
94 REQUIRE(error < tolerance);
100 trsm_inplace(
'R',
'T',L,B,diag,alpha);
101 Precision error = frobenius(B-X);
102 myra::out() <<
" |B/transpose(L)-X| = " << error << std::endl;
103 REQUIRE(error < tolerance);
109 trsm_inplace(
'R',
'H',L,B,diag,alpha);
110 Precision error = frobenius(B-X);
111 myra::out() <<
" |B/hermitian(L)-X| = " << error << std::endl;
112 REQUIRE(error < tolerance);
118 trsm_inplace(
'R',
'C',L,B,diag,alpha);
119 Precision error = frobenius(B-X);
120 myra::out() <<
" |B/conjugate(L)-X| = " << error << std::endl;
121 REQUIRE(error < tolerance);
127 ADD_TEST(
"strsmLower",
"[dense][lapack]")
128 { test<NumberS>(1.0e-2f); }
130 ADD_TEST(
"dtrsmLower",
"[dense][lapack]")
131 { test<NumberD>(1.0e-10); }
133 ADD_TEST(
"ctrsmLower",
"[dense][lapack]")
134 { test<NumberC>(1.0e-2f); }
136 ADD_TEST(
"ztrsmLower",
"[dense][lapack]")
137 { test<NumberZ>(1.0e-10); }
Returns a conjugated copy of a Matrix or Vector. Or, conjugate one inplace.
Cholesky factorization routines for positive definite matrices.
Interface class for representing subranges of dense Matrix's.
Tabulates an IxJ matrix. Allows random access, has column major layout to be compatible with BLAS/LAP...
Definition: bdsqr.h:20
Routines for computing Frobenius norms of various algebraic containers.
static Matrix< Number > random(int I, int J)
Generates a random Matrix of specified size.
Definition: Matrix.cpp:353
Range construct for a lower triangular matrix stored in rectangular packed format.
Routines for backsolving by a triangular Matrix or LowerMatrix.
Specialized container for a lower triangular matrix, O(N^2/2) storage. Used by symmetry exploiting ma...
Returns a transposed copy of a Matrix. The inplace version only works on a square operand...
Returns the lower triangle of a dense Matrix.
Various utility functions/classes related to scalar Number types.
General purpose dense matrix container, O(i*j) storage.
Reflects Precision trait for a Number, scalar Number types should specialize it.
Definition: Number.h:33
Returns a hermitian copy of a Matrix. The inplace version only works on a square operand.
Simplistic random number functions.
Stores a lower triangular matrix in rectangular packed format.
Definition: conjugate.h:22
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
std::complex<float>
|L\B-X| = 2.5539e-05
|transpose(L)\B-X| = 5.80269e-06
|hermitian(L)\B-X| = 5.66601e-06
|conjugate(L)\B-X| = 2.53304e-05
|B/L-X| = 6.02365e-06
|B/transpose(L)-X| = 2.33278e-05
|B/hermitian(L)-X| = 2.41674e-05
|B/conjugate(L)-X| = 5.51361e-06