27 #include <tests/myratest.h> 36 myra::out() << typestring<Number>() << std::endl;
43 Number alpha = random<Number>();
48 trmm_inplace(
'L',
'L',
'N',A,X,diag,alpha);
49 Precision error = frobenius(B-X);
50 myra::out() <<
" |L*X-B| = " << error << std::endl;
51 REQUIRE(error < tolerance);
57 trmm_inplace(
'L',
'L',
'T',A,X,diag,alpha);
58 Precision error = frobenius(B-X);
59 myra::out() <<
" |transpose(L)*X-B| = " << error << std::endl;
60 REQUIRE(error < tolerance);
66 trmm_inplace(
'L',
'L',
'H',A,X,diag,alpha);
67 Precision error = frobenius(B-X);
68 myra::out() <<
" |hermitian(L)*X-B| = " << error << std::endl;
69 REQUIRE(error < tolerance);
75 trmm_inplace(
'L',
'L',
'C',A,X,diag,alpha);
76 Precision error = frobenius(B-X);
77 myra::out() <<
" |conjugate(L)*X-B| = " << error << std::endl;
78 REQUIRE(error < tolerance);
84 trmm_inplace(
'R',
'L',
'N',A,X,diag,alpha);
85 Precision error = frobenius(B-X);
86 myra::out() <<
" |X*L-B| = " << error << std::endl;
87 REQUIRE(error < tolerance);
93 trmm_inplace(
'R',
'L',
'T',A,X,diag,alpha);
94 Precision error = frobenius(B-X);
95 myra::out() <<
" |X*tranpose(L)-B| = " << error << std::endl;
96 REQUIRE(error < tolerance);
102 trmm_inplace(
'R',
'L',
'H',A,X,diag,alpha);
103 Precision error = frobenius(B-X);
104 myra::out() <<
" |X*hermitian(L)-B| = " << error << std::endl;
105 REQUIRE(error < tolerance);
111 trmm_inplace(
'R',
'L',
'C',A,X,diag,alpha);
112 Precision error = frobenius(B-X);
113 myra::out() <<
" |X*conjugate(L)-B| = " << error << std::endl;
114 REQUIRE(error < tolerance);
120 ADD_TEST(
"strmmL",
"[dense][lapack]")
121 { test<NumberS>(1.0e-4f); }
123 ADD_TEST(
"dtrmmL",
"[dense][lapack]")
124 { test<NumberD>(1.0e-10); }
126 ADD_TEST(
"ctrmmL",
"[dense][lapack]")
127 { test<NumberC>(1.0e-4f); }
129 ADD_TEST(
"ztrmmL",
"[dense][lapack]")
130 { test<NumberZ>(1.0e-10); }
Returns a conjugated copy of a Matrix or Vector. Or, conjugate one inplace.
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 multiplying by a triangular Matrix or LowerMatrix.
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.
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
float
|L*X-B| = 9.81828e-07
|transpose(L)*X-B| = 8.12303e-07
|hermitian(L)*X-B| = 8.21886e-07
|conjugate(L)*X-B| = 8.90141e-07
|X*L-B| = 0
|X*tranpose(L)-B| = 9.61046e-07
|X*hermitian(L)-B| = 8.80624e-07
|X*conjugate(L)-B| = 0