mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
make example compile
This commit is contained in:
parent
f84cbba52a
commit
cd1225ef14
@ -58,7 +58,8 @@ Prints the inverse condition number of the given matrix or matrix-expression.
|
|||||||
template <typename Derived>
|
template <typename Derived>
|
||||||
void print_inv_cond(const MatrixBase<Derived>& a)
|
void print_inv_cond(const MatrixBase<Derived>& a)
|
||||||
{
|
{
|
||||||
const typename JacobiSVD<typename Derived::PlainObject>::SingularValuesType& sing_vals = a.svd().singularValues();
|
const typename JacobiSVD<typename Derived::PlainObject>::SingularValuesType&
|
||||||
|
sing_vals = a.jacobiSvd().singularValues();
|
||||||
std::cout << "inv cond: " << sing_vals(sing_vals.size()-1) / sing_vals(0) << std::endl;
|
std::cout << "inv cond: " << sing_vals(sing_vals.size()-1) / sing_vals(0) << std::endl;
|
||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user