10 #ifdef EIGEN_TEST_PART_100
11 # define EIGEN_NO_DEPRECATED_WARNING
26 m1.template triangularView<Eigen::Upper>().swap(
m2);
28 m3.template triangularView<Eigen::Upper>().swap(m4.template triangularView<Eigen::Upper>());
32 m1.template triangularView<Eigen::Lower>().swap(m4);
34 m3.template triangularView<Eigen::Lower>().swap(
m2.template triangularView<Eigen::Lower>());
46 RealScalar largerEps = 10*test_precision<RealScalar>();
64 VERIFY(m1up.isUpperTriangular());
65 VERIFY(m2up.transpose().isLowerTriangular());
74 r1.template triangularView<Upper>() +=
m1;
80 m1.template triangularView<Upper>() =
m2.transpose() +
m2;
98 m3 =
m1.template triangularView<Upper>();
101 VERIFY(
v2.isApprox(
m3.transpose() * (
m1.transpose().template triangularView<Upper>().solve(
v2)), largerEps));
102 m3 =
m1.template triangularView<Upper>();
103 VERIFY(
v2.isApprox(
m3 * (
m1.template triangularView<Upper>().solve(
v2)), largerEps));
108 m3 =
m1.template triangularView<Upper>();
111 VERIFY(
m2.isApprox(
m3.transpose() * (
m1.transpose().template triangularView<Upper>().solve(
m2)), largerEps));
112 m3 =
m1.template triangularView<Upper>();
113 VERIFY(
m2.isApprox(
m3 * (
m1.template triangularView<Upper>().solve(
m2)), largerEps));
119 m1.transpose().template triangularView<Eigen::Upper>().solveInPlace(trm4);
123 m3 =
m1.template triangularView<Upper>();
125 m3.transpose().template triangularView<Eigen::Lower>().solveInPlace(trm4);
129 m3 =
m1.template triangularView<UnitUpper>();
130 VERIFY(
m2.isApprox(
m3 * (
m1.template triangularView<UnitUpper>().solve(
m2)), largerEps));
138 m2.template triangularView<Upper>().swap(
m1.template triangularView<Eigen::Upper>());
140 m3.template triangularView<Upper>().setOnes();
145 m3 =
m1.template triangularView<Upper>();
151 m1up =
m1.template triangularView<Upper>();
152 VERIFY_IS_APPROX(
m1.template selfadjointView<Upper>().template triangularView<Upper>().toDenseMatrix(), m1up);
153 VERIFY_IS_APPROX(m1up.template selfadjointView<Upper>().template triangularView<Upper>().toDenseMatrix(), m1up);
168 VERIFY(
is_same_type(m3c.template selfadjointView<Lower>(),
m3.template selfadjointView<Lower>().template conjugateIf<false>()) );
169 VERIFY(
is_same_type(m3c.template selfadjointView<Lower>().conjugate(),
m3.template selfadjointView<Lower>().template conjugateIf<true>()) );
170 VERIFY_IS_APPROX(
m3.template selfadjointView<Lower>().template conjugateIf<true>().toDenseMatrix(),
171 m3.conjugate().template selfadjointView<Lower>().toDenseMatrix());
172 VERIFY_IS_APPROX(
m3.template selfadjointView<Lower>().template conjugateIf<false>().toDenseMatrix(),
173 m3.template selfadjointView<Lower>().toDenseMatrix());
182 enum { Rows = MatrixType::RowsAtCompileTime,
Cols = MatrixType::ColsAtCompileTime };
199 VERIFY(m1up.isUpperTriangular());
200 VERIFY(m2up.transpose().isLowerTriangular());
207 r1.template triangularView<Upper>() +=
m1;
213 m1.template triangularView<Upper>() = 3 *
m2;
223 m1.template triangularView<StrictlyUpper>() = 3 *
m2;
228 m1.template triangularView<StrictlyLower>() = 3 *
m2;
231 m2 =
m1.template triangularView<Upper>();
234 m2 =
m1.template triangularView<StrictlyUpper>();
237 m2 =
m1.template triangularView<UnitUpper>();
244 m2 =
m1.template triangularView<StrictlyLower>();
247 m2 =
m1.template triangularView<UnitLower>();
254 m2.template triangularView<Upper>().swap(
m1.template triangularView<Eigen::Upper>());
256 m3.template triangularView<Upper>().setOnes();
262 Matrix3d
m = Matrix3d::Random().triangularView<
Lower>();