13 #include <Eigen/Eigenvalues>
15 template<
typename EigType,
typename MatType>
20 typedef typename std::complex<RealScalar>
Complex;
25 eig.eigenvectors() *
eig.eigenvalues().asDiagonal());
40 typedef typename std::complex<RealScalar>
Complex;
77 a(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();
85 eig.compute(
a.adjoint() *
a);
107 eig.compute(
a,
false);
113 template<
typename CoeffType>
117 Index n = coeffs.size()-1;
120 res.row(0) = -coeffs.tail(
n) / coeffs(0);
121 res.diagonal(-1).setOnes();
155 VectorXd coeffs(5); coeffs << 1, -3, -175, -225, 2250;
162 VectorXd coeffs(5); coeffs << 6.154671e-15, -1.003870e-10, -9.819570e-01, 3.995715e+03, 2.211511e+08;
169 typedef std::complex<double>
Complex;
171 ac.diagonal().array() -=
eig.eigenvalues()(
i);
172 VectorXd sv = ac.jacobiSvd().singularValues();
182 MatrixXd A_bug1557(3,3);
183 A_bug1557 << 0, 0, 0, 1, 0, 0.5887907064808635127, 0, 1, 0;
191 MatrixXf A_bug1174(
n,
n);
192 A_bug1174 << 262144, 0, 0, 262144, 786432, 0, 0, 0, 0, 0, 0, 786432,
193 262144, 0, 0, 262144, 786432, 0, 0, 0, 0, 0, 0, 786432,
194 262144, 0, 0, 262144, 786432, 0, 0, 0, 0, 0, 0, 786432,
195 262144, 0, 0, 262144, 786432, 0, 0, 0, 0, 0, 0, 786432,
196 0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,
197 0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,
198 0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,
199 0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,
200 0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,
201 0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,
202 0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,
203 0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0;