mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-13 08:31:48 +08:00
Remove debug code.
(grafted from cf697272e1326e5ceecfd876ea67943b88425521 )
This commit is contained in:
parent
7c42084503
commit
b7249a2a42
@ -355,13 +355,11 @@ class PolynomialSolver : public PolynomialSolverBase<_Scalar,_Deg>
|
|||||||
companion.balance();
|
companion.balance();
|
||||||
m_eigenSolver.compute( companion.denseMatrix() );
|
m_eigenSolver.compute( companion.denseMatrix() );
|
||||||
m_roots = m_eigenSolver.eigenvalues();
|
m_roots = m_eigenSolver.eigenvalues();
|
||||||
MatrixXcd A = companion.denseMatrix();
|
|
||||||
// cleanup noise in imaginary part of real roots:
|
// cleanup noise in imaginary part of real roots:
|
||||||
// if the imaginary part is rather small compared to the real part
|
// if the imaginary part is rather small compared to the real part
|
||||||
// and that cancelling the imaginary part yield a smaller evaluation,
|
// and that cancelling the imaginary part yield a smaller evaluation,
|
||||||
// then it's safe to keep the real part only.
|
// then it's safe to keep the real part only.
|
||||||
RealScalar coarse_prec = std::pow(4,poly.size()+1)*NumTraits<RealScalar>::epsilon();
|
RealScalar coarse_prec = RealScalar(std::pow(4,poly.size()+1))*NumTraits<RealScalar>::epsilon();
|
||||||
std::cout << coarse_prec << "\n";
|
|
||||||
for(Index i = 0; i<m_roots.size(); ++i)
|
for(Index i = 0; i<m_roots.size(); ++i)
|
||||||
{
|
{
|
||||||
if( internal::isMuchSmallerThan(numext::abs(numext::imag(m_roots[i])),
|
if( internal::isMuchSmallerThan(numext::abs(numext::imag(m_roots[i])),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user