Lines Matching refs:lu
11 #include <Eigen/LU>
24 LU.h
65 FullPivLU<MatrixType> lu;
70 lu.setThreshold(RealScalar(0.01));
71 lu.compute(m1);
74 u = lu.matrixLU().template triangularView<Upper>();
77 = lu.matrixLU().block(0,0,rows,(std::min)(rows,cols));
79 VERIFY_IS_APPROX(lu.permutationP() * m1 * lu.permutationQ(), l*u);
81 KernelMatrixType m1kernel = lu.kernel();
82 ImageMatrixType m1image = lu.image(m1);
84 VERIFY_IS_APPROX(m1, lu.reconstructedMatrix());
85 VERIFY(rank == lu.rank());
86 VERIFY(cols - lu.rank() == lu.dimensionOfKernel());
87 VERIFY(!lu.isInjective());
88 VERIFY(!lu.isInvertible());
89 VERIFY(!lu.isSurjective());
98 m2.block(0,0,m2.rows(),m2.cols()) = lu.solve(m3);
105 lu.template _solve_impl_transposed<false>(m2, m3);
108 m3 = lu.transpose().solve(m2);
115 lu.template _solve_impl_transposed<true>(m2, m3);
118 m3 = lu.adjoint().solve(m2);
125 LU.h
133 FullPivLU<MatrixType> lu;
134 lu.setThreshold(RealScalar(0.01));
137 lu.compute(m1);
138 } while(!lu.isInvertible());
140 VERIFY_IS_APPROX(m1, lu.reconstructedMatrix());
141 VERIFY(0 == lu.dimensionOfKernel());
142 VERIFY(lu.kernel().cols() == 1); // the kernel() should consist of a single (zero) column vector
143 VERIFY(size == lu.rank());
144 VERIFY(lu.isInjective());
145 VERIFY(lu.isSurjective());
146 VERIFY(lu.isInvertible());
147 VERIFY(lu.image(m1).fullPivLu().isInvertible());
149 m2 = lu.solve(m3);
151 MatrixType m1_inverse = lu.inverse();
155 const RealScalar rcond_est = lu.rcond();
161 lu.template _solve_impl_transposed<false>(m3, m2);
164 m3 = lu.transpose().solve(m2);
168 lu.template _solve_impl_transposed<true>(m3, m2);
171 m3 = lu.adjoint().solve(m2);
176 VERIFY_IS_APPROX(lu.solve(m3*m4), lu.solve(m3)*m4);
224 FullPivLU<MatrixType> lu;
225 VERIFY_RAISES_ASSERT(lu.matrixLU())
226 VERIFY_RAISES_ASSERT(lu.permutationP())
227 VERIFY_RAISES_ASSERT(lu.permutationQ())
228 VERIFY_RAISES_ASSERT(lu.kernel())
229 VERIFY_RAISES_ASSERT(lu.image(tmp))
230 VERIFY_RAISES_ASSERT(lu.solve(tmp))
231 VERIFY_RAISES_ASSERT(lu.determinant())
232 VERIFY_RAISES_ASSERT(lu.rank())
233 VERIFY_RAISES_ASSERT(lu.dimensionOfKernel())
234 VERIFY_RAISES_ASSERT(lu.isInjective())
235 VERIFY_RAISES_ASSERT(lu.isSurjective())
236 VERIFY_RAISES_ASSERT(lu.isInvertible())
237 VERIFY_RAISES_ASSERT(lu.inverse())