26 #include <tests/myratest.h> 38 int K = I < J ? I : J;
39 myra::out() << typestring<Number>() << std::endl;
44 auto tau = gelqf_inplace(A);
47 ormlq_inplace(A,tau,B1,
'R',
'N');
50 auto VlVr = A.split_left(K);
52 auto Vr = VlVr.second;
53 auto BlBr = B2.split_left(K);
55 auto Br = BlBr.second;
58 trmm_inplace(
'R',
'U',
'H',Vl,W,
'U');
59 gemm_inplace(W,Br,
'N',Vr,
'H',one,one);
61 trmm_inplace(
'R',
'L',
'N',Vl,W,
'N',one);
63 gemm_inplace(Br,W,
'N',Vr,
'N',-one,one);
64 trmm_inplace(
'R',
'U',
'N',Vl,W,
'U');
67 Precision error = frobenius(B1-B2) / frobenius(B1);
68 myra::out() <<
"|Q*B1(ormlq) - Q*B2(lqt)| = " << error << std::endl;
69 REQUIRE(error < tolerance);
74 ADD_TEST(
"slqt",
"[dense][lapack]")
75 { test<NumberS>(159,178,1.0e-4f); }
77 ADD_TEST(
"dlqt",
"[dense][lapack]")
78 { test<NumberD>(159,178,1.0e-10); }
80 ADD_TEST(
"clqt",
"[dense][lapack]")
81 { test<NumberC>(159,178,1.0e-4f); }
83 ADD_TEST(
"zlqt",
"[dense][lapack]")
84 { test<NumberZ>(159,178,1.0e-10); }
Interface class for representing subranges of dense Matrix's.
Routines to apply a Householder Q, as previously factored via gelqf_inplace()
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.
Given the scalar reflectors [V,tau] from gelqf(), forms the T of the equivalent block reflector I-V'*...
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.
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
Routines to compute a Householder LQ decomposition.