Home | History | Annotate | Download | only in test

Lines Matching refs:svd

15 #include <Eigen/SVD>
18 void jacobisvd_check_full(const MatrixType& m, const JacobiSVD<MatrixType, QRPreconditioner>& svd)
34 sigma.diagonal() = svd.singularValues().template cast<Scalar>();
35 MatrixUType u = svd.matrixU();
36 MatrixVType v = svd.matrixV();
53 JacobiSVD<MatrixType, QRPreconditioner> svd(m, computationOptions);
55 VERIFY_IS_APPROX(svd.singularValues(), referenceSvd.singularValues());
57 VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU());
59 VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU().leftCols(diagSize));
61 VERIFY_IS_APPROX(svd.matrixV(), referenceSvd.matrixV());
63 VERIFY_IS_APPROX(svd.matrixV(), referenceSvd.matrixV().leftCols(diagSize));
84 JacobiSVD<MatrixType, QRPreconditioner> svd(m, computationOptions);
86 if(internal::is_same<RealScalar,double>::value) svd.setThreshold(1e-8);
87 else if(internal::is_same<RealScalar,float>::value) svd.setThreshold(1e-4);
89 SolutionType x = svd.solve(rhs);
141 // now check with SVD
205 JacobiSVD<MatrixType, QRPreconditioner> svd(m, ComputeThinU | ComputeThinV);
206 VERIFY_IS_APPROX(m, svd.matrixU().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matrixV().leftCols(diagSize).adjoint());
254 JacobiSVD<MatrixType> svd;
255 VERIFY_RAISES_ASSERT(svd.matrixU())
256 VERIFY_RAISES_ASSERT(svd.singularValues())
257 VERIFY_RAISES_ASSERT(svd.matrixV())
258 VERIFY_RAISES_ASSERT(svd.solve(rhs))
262 svd.compute(a, 0);
263 VERIFY_RAISES_ASSERT(svd.matrixU())
264 VERIFY_RAISES_ASSERT(svd.matrixV())
265 svd.singularValues();
266 VERIFY_RAISES_ASSERT(svd.solve(rhs))
270 svd.compute(a, ComputeThinU);
271 svd.matrixU();
272 VERIFY_RAISES_ASSERT(svd.matrixV())
273 VERIFY_RAISES_ASSERT(svd.solve(rhs))
275 svd.compute(a, ComputeThinV);
276 svd.matrixV();
277 VERIFY_RAISES_ASSERT(svd.matrixU())
278 VERIFY_RAISES_ASSERT(svd.solve(rhs))
287 VERIFY_RAISES_ASSERT(svd.compute(a, ComputeThinU))
288 VERIFY_RAISES_ASSERT(svd.compute(a, ComputeThinV))
318 JacobiSVD<MatrixType> svd;
322 svd.compute(MatrixType::Constant(10,10,some_inf), ComputeFullU | ComputeFullV);
326 svd.compute(MatrixType::Constant(10,10,nan), ComputeFullU | ComputeFullV);
330 svd.compute(m, ComputeFullU | ComputeFullV);
334 svd.compute(m, ComputeFullU | ComputeFullV);
341 svd.compute(m, ComputeFullU | ComputeFullV);
359 JacobiSVD<Matrix2d> svd;
360 svd.compute(M); // just check we don't loop indefinitely
370 JacobiSVD<MatrixXf> svd;
372 svd.compute(m);
373 VERIFY_IS_APPROX(svd.singularValues(), v);