Lines Matching refs:svd
24 void svd_check_full(const MatrixType& m, const SvdType& svd) in svd_check_full() argument
41 sigma.diagonal() = svd.singularValues().template cast<Scalar>(); in svd_check_full()
42 MatrixUType u = svd.matrixU(); in svd_check_full()
43 MatrixVType v = svd.matrixV(); in svd_check_full()
69 SvdType svd(m, computationOptions); in svd_compare_to_full()
71 VERIFY_IS_APPROX(svd.singularValues(), referenceSvd.singularValues()); in svd_compare_to_full()
75 VERIFY( (svd.matrixV().adjoint()*svd.matrixV()).isIdentity(prec) ); in svd_compare_to_full()
76 …VERIFY_IS_APPROX( svd.matrixV().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matri… in svd_compare_to_full()
82 VERIFY( (svd.matrixU().adjoint()*svd.matrixU()).isIdentity(prec) ); in svd_compare_to_full()
83 …VERIFY_IS_APPROX( svd.matrixU().leftCols(diagSize) * svd.singularValues().cwiseAbs2().asDiagonal()… in svd_compare_to_full()
91 if(computationOptions & ComputeFullU) VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU()); in svd_compare_to_full()
92 …if(computationOptions & ComputeThinU) VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU().left… in svd_compare_to_full()
93 …if(computationOptions & ComputeFullV) VERIFY_IS_APPROX(svd.matrixV().cwiseAbs(), referenceSvd.mat… in svd_compare_to_full()
94 …if(computationOptions & ComputeThinV) VERIFY_IS_APPROX(svd.matrixV(), referenceSvd.matrixV().left… in svd_compare_to_full()
117 SvdType svd(m, computationOptions); in svd_least_square()
119 if(internal::is_same<RealScalar,double>::value) svd.setThreshold(1e-8); in svd_least_square()
120 else if(internal::is_same<RealScalar,float>::value) svd.setThreshold(2e-4); in svd_least_square()
122 SolutionType x = svd.solve(rhs); in svd_least_square()
131 if(internal::is_same<RealScalar,double>::value || svd.rank()==m.diagonal().size()) in svd_least_square()
266 SvdType svd(m, ComputeThinU | ComputeThinV); in svd_test_all_computation_options()
267 …VERIFY_IS_APPROX(m, svd.matrixU().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.mat… in svd_test_all_computation_options()
284 SvdType svd; in svd_inf_nan() local
288 svd.compute(MatrixType::Constant(10,10,some_inf), ComputeFullU | ComputeFullV); in svd_inf_nan()
292 svd.compute(MatrixType::Constant(10,10,nan), ComputeFullU | ComputeFullV); in svd_inf_nan()
296 svd.compute(m, ComputeFullU | ComputeFullV); in svd_inf_nan()
300 svd.compute(m, ComputeFullU | ComputeFullV); in svd_inf_nan()
307 svd.compute(m, ComputeFullU | ComputeFullV); in svd_inf_nan()
314 svd.compute(m, ComputeFullU | ComputeFullV); in svd_inf_nan()
330 SVD_DEFAULT(Matrix2d) svd; in svd_underoverflow()
331 svd.compute(M,ComputeFullU|ComputeFullV); in svd_underoverflow()
332 CALL_SUBTEST( svd_check_full(M,svd) ); in svd_underoverflow()
342 svd.compute(M,ComputeFullU|ComputeFullV); in svd_underoverflow()
343 CALL_SUBTEST( svd_check_full(M,svd) ); in svd_underoverflow()
405 SVD_DEFAULT(MatrixXf) svd; in svd_preallocate()
407 svd.compute(m); in svd_preallocate()
408 VERIFY_IS_APPROX(svd.singularValues(), v); in svd_preallocate()
451 SvdType svd; in svd_verify_assert() local
452 VERIFY_RAISES_ASSERT(svd.matrixU()) in svd_verify_assert()
453 VERIFY_RAISES_ASSERT(svd.singularValues()) in svd_verify_assert()
454 VERIFY_RAISES_ASSERT(svd.matrixV()) in svd_verify_assert()
455 VERIFY_RAISES_ASSERT(svd.solve(rhs)) in svd_verify_assert()
458 svd.compute(a, 0); in svd_verify_assert()
459 VERIFY_RAISES_ASSERT(svd.matrixU()) in svd_verify_assert()
460 VERIFY_RAISES_ASSERT(svd.matrixV()) in svd_verify_assert()
461 svd.singularValues(); in svd_verify_assert()
462 VERIFY_RAISES_ASSERT(svd.solve(rhs)) in svd_verify_assert()
466 svd.compute(a, ComputeThinU); in svd_verify_assert()
467 svd.matrixU(); in svd_verify_assert()
468 VERIFY_RAISES_ASSERT(svd.matrixV()) in svd_verify_assert()
469 VERIFY_RAISES_ASSERT(svd.solve(rhs)) in svd_verify_assert()
470 svd.compute(a, ComputeThinV); in svd_verify_assert()
471 svd.matrixV(); in svd_verify_assert()
472 VERIFY_RAISES_ASSERT(svd.matrixU()) in svd_verify_assert()
473 VERIFY_RAISES_ASSERT(svd.solve(rhs)) in svd_verify_assert()
477 VERIFY_RAISES_ASSERT(svd.compute(a, ComputeThinU)) in svd_verify_assert()
478 VERIFY_RAISES_ASSERT(svd.compute(a, ComputeThinV)) in svd_verify_assert()