Lines Matching full:triangularview
1 // This file is triangularView of Eigen, a lightweight C++ template library
33 MatrixType m1up = m1.template triangularView<Upper>();
34 MatrixType m2up = m2.template triangularView<Upper>();
48 r1.template triangularView<Upper>() += m1;
54 m1.template triangularView<Upper>() = m2.transpose() + m2;
56 VERIFY_IS_APPROX(m3.template triangularView<Lower>().transpose().toDenseMatrix(), m1);
60 m1.template triangularView<Lower>() = m2.transpose() + m2;
61 VERIFY_IS_APPROX(m3.template triangularView<Lower>().toDenseMatrix(), m1);
63 VERIFY_IS_APPROX(m3.template triangularView<Lower>().conjugate().toDenseMatrix(),
64 m3.conjugate().template triangularView<Lower>().toDenseMatrix());
72 m3 = m1.template triangularView<Upper>();
73 VERIFY(v2.isApprox(m3.adjoint() * (m1.adjoint().template triangularView<Lower>().solve(v2)), largerEps));
74 m3 = m1.template triangularView<Lower>();
75 VERIFY(v2.isApprox(m3.transpose() * (m1.transpose().template triangularView<Upper>().solve(v2)), largerEps));
76 m3 = m1.template triangularView<Upper>();
77 VERIFY(v2.isApprox(m3 * (m1.template triangularView<Upper>().solve(v2)), largerEps));
78 m3 = m1.template triangularView<Lower>();
79 VERIFY(v2.isApprox(m3.conjugate() * (m1.conjugate().template triangularView<Lower>().solve(v2)), largerEps));
82 m3 = m1.template triangularView<Upper>();
83 VERIFY(m2.isApprox(m3.adjoint() * (m1.adjoint().template triangularView<Lower>().solve(m2)), largerEps));
84 m3 = m1.template triangularView<Lower>();
85 VERIFY(m2.isApprox(m3.transpose() * (m1.transpose().template triangularView<Upper>().solve(m2)), largerEps));
86 m3 = m1.template triangularView<Upper>();
87 VERIFY(m2.isApprox(m3 * (m1.template triangularView<Upper>().solve(m2)), largerEps));
88 m3 = m1.template triangularView<Lower>();
89 VERIFY(m2.isApprox(m3.conjugate() * (m1.conjugate().template triangularView<Lower>().solve(m2)), largerEps));
93 m1.transpose().template triangularView<Eigen::Upper>().solveInPlace(trm4);
94 VERIFY_IS_APPROX(m4 * m1.template triangularView<Eigen::Lower>(), m3);
97 m3 = m1.template triangularView<Upper>();
99 m3.transpose().template triangularView<Eigen::Lower>().solveInPlace(trm4);
100 VERIFY_IS_APPROX(m4 * m1.template triangularView<Eigen::Upper>(), m3);
103 m3 = m1.template triangularView<UnitUpper>();
104 VERIFY(m2.isApprox(m3 * (m1.template triangularView<UnitUpper>().solve(m2)), largerEps));
106 // VERIFY(( m1.template triangularView<Upper>()
107 // * m2.template triangularView<Upper>()).isUpperTriangular());
112 m2.template triangularView<Upper>().swap(m1);
114 m3.template triangularView<Upper>().setOnes();
118 m3 = m1.template triangularView<Upper>();
121 VERIFY_IS_APPROX(m1.template triangularView<Upper>() * m5, m3*m5);
122 VERIFY_IS_APPROX(m6*m1.template triangularView<Upper>(), m6*m3);
124 m1up = m1.template triangularView<Upper>();
125 VERIFY_IS_APPROX(m1.template selfadjointView<Upper>().template triangularView<Upper>().toDenseMatrix(), m1up);
126 VERIFY_IS_APPROX(m1up.template selfadjointView<Upper>().template triangularView<Upper>().toDenseMatrix(), m1up);
127 VERIFY_IS_APPROX(m1.template selfadjointView<Upper>().template triangularView<Lower>().toDenseMatrix(), m1up.adjoint());
128 VERIFY_IS_APPROX(m1up.template selfadjointView<Upper>().template triangularView<Lower>().toDenseMatrix(), m1up.adjoint());
152 MatrixType m1up = m1.template triangularView<Upper>();
153 MatrixType m2up = m2.template triangularView<Upper>();
165 r1.template triangularView<Upper>() += m1;
171 m1.template triangularView<Upper>() = 3 * m2;
173 VERIFY_IS_APPROX(m3.template triangularView<Upper>().toDenseMatrix(), m1);
177 m1.template triangularView<Lower>() = 3 * m2;
178 VERIFY_IS_APPROX(m3.template triangularView<Lower>().toDenseMatrix(), m1);
181 m1.template triangularView<StrictlyUpper>() = 3 * m2;
182 VERIFY_IS_APPROX(m3.template triangularView<StrictlyUpper>().toDenseMatrix(), m1);
186 m1.template triangularView<StrictlyLower>() = 3 * m2;
187 VERIFY_IS_APPROX(m3.template triangularView<StrictlyLower>().toDenseMatrix(), m1);
189 m2 = m1.template triangularView<Upper>();
192 m2 = m1.template triangularView<StrictlyUpper>();
195 m2 = m1.template triangularView<UnitUpper>();
199 m2 = m1.template triangularView<Lower>();
202 m2 = m1.template triangularView<StrictlyLower>();
205 m2 = m1.template triangularView<UnitLower>();
212 m2.template triangularView<Upper>().swap(m1);
214 m3.template triangularView<Upper>().setOnes();
220 Matrix3d m = Matrix3d::Random().triangularView<Lower>();