Lines Matching refs: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();
140 MatrixType m1up = m1.template triangularView<Upper>();
141 MatrixType m2up = m2.template triangularView<Upper>();
153 r1.template triangularView<Upper>() += m1;
159 m1.template triangularView<Upper>() = 3 * m2;
161 VERIFY_IS_APPROX(m3.template triangularView<Upper>().toDenseMatrix(), m1);
165 m1.template triangularView<Lower>() = 3 * m2;
166 VERIFY_IS_APPROX(m3.template triangularView<Lower>().toDenseMatrix(), m1);
169 m1.template triangularView<StrictlyUpper>() = 3 * m2;
170 VERIFY_IS_APPROX(m3.template triangularView<StrictlyUpper>().toDenseMatrix(), m1);
174 m1.template triangularView<StrictlyLower>() = 3 * m2;
175 VERIFY_IS_APPROX(m3.template triangularView<StrictlyLower>().toDenseMatrix(), m1);
177 m2 = m1.template triangularView<Upper>();
180 m2 = m1.template triangularView<StrictlyUpper>();
183 m2 = m1.template triangularView<UnitUpper>();
187 m2 = m1.template triangularView<Lower>();
190 m2 = m1.template triangularView<StrictlyLower>();
193 m2 = m1.template triangularView<UnitLower>();
200 m2.template triangularView<Upper>().swap(m1);
202 m3.template triangularView<Upper>().setOnes();
208 Matrix3d m = Matrix3d::Random().triangularView<Lower>();