26 RMatrixType rm2 = MatrixType::Random(
rows,
cols);
28 Rhs1 rhs1 = Rhs1::Random(internal::random<int>(1,320),
cols); Rhs1 rhs11 = Rhs1::Random(rhs1.rows(),
cols);
29 Rhs2 rhs2 = Rhs2::Random(
rows, internal::random<int>(1,320)); Rhs2 rhs22 = Rhs2::Random(
rows, rhs2.cols());
30 Rhs3 rhs3 = Rhs3::Random(internal::random<int>(1,320),
rows);
32 Scalar s1 = internal::random<Scalar>();
37 VERIFY_IS_APPROX((
m2.template selfadjointView<Lower>().rankUpdate(rhs2,s1)._expression()),
45 VERIFY_IS_APPROX(
m2.template selfadjointView<Upper>().rankUpdate(rhs2,s1)._expression(),
46 (s1 * rhs2 * rhs2.adjoint()).eval().template triangularView<Upper>().toDenseMatrix());
48 VERIFY_IS_APPROX((
m2.template triangularView<Upper>() += s1 * rhs22 * rhs2.adjoint()).nestedExpression(),
49 (s1 * rhs22 * rhs2.adjoint()).eval().template triangularView<Upper>().toDenseMatrix());
53 VERIFY_IS_APPROX(
m2.template selfadjointView<Lower>().rankUpdate(rhs1.adjoint(),s1)._expression(),
61 VERIFY_IS_APPROX(
m2.template selfadjointView<Upper>().rankUpdate(rhs1.adjoint(),s1)._expression(),
62 (s1 * rhs1.adjoint() * rhs1).eval().template triangularView<Upper>().toDenseMatrix());
63 VERIFY_IS_APPROX((
m2.template triangularView<Upper>() = s1 * rhs1.adjoint() * rhs11).nestedExpression(),
64 (s1 * rhs1.adjoint() * rhs11).eval().template triangularView<Upper>().toDenseMatrix());
68 VERIFY_IS_APPROX(
m2.template selfadjointView<Lower>().rankUpdate(rhs3.adjoint(),s1)._expression(),
72 VERIFY_IS_APPROX(
m2.template selfadjointView<Upper>().rankUpdate(rhs3.adjoint(),s1)._expression(),
73 (s1 * rhs3.adjoint() * rhs3).eval().template triangularView<Upper>().toDenseMatrix());
81 ((s1 *
m1.col(
c) *
m1.col(
c).adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));
83 VERIFY_IS_APPROX((rm2.template selfadjointView<Upper>().rankUpdate(
m1.col(
c),s1)._expression()),
84 ((s1 *
m1.col(
c) *
m1.col(
c).adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));
87 ((s1 *
m3.col(
c) *
m1.col(
c).adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));
89 VERIFY_IS_APPROX((rm2.template triangularView<Upper>() += s1 *
m1.col(
c) *
m3.col(
c).adjoint()).nestedExpression(),
90 ((s1 *
m1.col(
c) *
m3.col(
c).adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));
93 VERIFY_IS_APPROX((
m2.template selfadjointView<Lower>().rankUpdate(
m1.col(
c).conjugate(),s1)._expression()),
97 VERIFY_IS_APPROX((
m2.template selfadjointView<Upper>().rankUpdate(
m1.col(
c).conjugate(),s1)._expression()),
98 ((s1 *
m1.col(
c).conjugate() *
m1.col(
c).conjugate().adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));
105 VERIFY_IS_APPROX((rm2.template selfadjointView<Lower>().rankUpdate(
m1.row(
c),s1)._expression()),
116 VERIFY_IS_APPROX((
m2.template selfadjointView<Upper>().rankUpdate(
m1.row(
c).adjoint(),s1)._expression()),
117 ((s1 *
m1.row(
c).adjoint() *
m1.row(
c).adjoint().adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));
126 VERIFY_IS_APPROX((map1.template selfadjointView<Lower>().rankUpdate(rhs2,s1)._expression()),