28 #include <tests/myratest.h> 37 myra::out() << typestring<Number>() << std::endl;
43 potrf_inplace(
'U',
'R',A);
46 Number alpha = random<Number>();
52 trsm_inplace(
'L',
'U',
'N',U,B,diag,alpha);
53 Precision error = frobenius(B-X);
54 myra::out() <<
" |U\\B-X| = " << error << std::endl;
55 REQUIRE(error < tolerance);
61 trsm_inplace(
'L',
'U',
'T',U,B,diag,alpha);
62 Precision error = frobenius(B-X);
63 myra::out() <<
" |transpose(U)\\B-X| = " << error << std::endl;
64 REQUIRE(error < tolerance);
70 trsm_inplace(
'L',
'U',
'H',A,B,diag,alpha);
71 Precision error = frobenius(B-X);
72 myra::out() <<
" |hermitian(U)\\B-X| = " << error << std::endl;
73 REQUIRE(error < tolerance);
79 trsm_inplace(
'L',
'U',
'C',A,B,diag,alpha);
80 Precision error = frobenius(B-X);
81 myra::out() <<
" |conjugate(U)\\B-X| = " << error << std::endl;
82 REQUIRE(error < tolerance);
88 trsm_inplace(
'R',
'U',
'N',A,B,diag,alpha);
89 Precision error = frobenius(B-X);
90 myra::out() <<
" |B/U-X| = " << error << std::endl;
91 REQUIRE(error < tolerance);
97 trsm_inplace(
'R',
'U',
'T',A,B,diag,alpha);
98 Precision error = frobenius(B-X);
99 myra::out() <<
" |B/transpose(U)-X| = " << error << std::endl;
100 REQUIRE(error < tolerance);
106 trsm_inplace(
'R',
'U',
'H',A,B,diag,alpha);
107 Precision error = frobenius(B-X);
108 myra::out() <<
" |B/hermitian(U)-X| = " << error << std::endl;
109 REQUIRE(error < tolerance);
115 trsm_inplace(
'R',
'U',
'C',A,B,diag,alpha);
116 Precision error = frobenius(B-X);
117 myra::out() <<
" |B/conjugate(U)-X| = " << error << std::endl;
118 REQUIRE(error < tolerance);
124 ADD_TEST(
"strsmU",
"[dense][lapack]")
125 { test<NumberS>(1.0e-2f); }
127 ADD_TEST(
"dtrsmU",
"[dense][lapack]")
128 { test<NumberD>(1.0e-10); }
130 ADD_TEST(
"ctrsmU",
"[dense][lapack]")
131 { test<NumberC>(1.0e-2f); }
133 ADD_TEST(
"ztrsmU",
"[dense][lapack]")
134 { 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
Routines for backsolving by a triangular Matrix or LowerMatrix.
Returns a transposed copy of a Matrix. The inplace version only works on a square operand...
Returns the upper 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.
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
std::complex<float>
|U\B-X| = 1.44508e-05
|transpose(U)\B-X| = 5.14509e-06
|hermitian(U)\B-X| = 5.70594e-06
|conjugate(U)\B-X| = 1.48461e-05
|B/U-X| = 5.34548e-06
|B/transpose(U)-X| = 1.49413e-05
|B/hermitian(U)-X| = 1.40171e-05
|B/conjugate(U)-X| = 5.26865e-06