diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-12-09 22:54:39 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-12-09 22:54:39 +0100 |
commit | 450dc97c6b14cd738def377d8b04c12427c6449a (patch) | |
tree | 4f0c67664affc9d185fecc3ae7955cb46e13698a /unsupported/Eigen/src/Polynomials/Companion.h | |
parent | 348bb386d1737eaf2a5e61a2b37fd2a3f561b109 (diff) |
Various fixes in polynomial solver and its unit tests:
- cleanup noise in imaginary part of real roots
- take into account the magnitude of the derivative to check roots.
- use <= instead of < at appropriate places
Diffstat (limited to 'unsupported/Eigen/src/Polynomials/Companion.h')
-rw-r--r-- | unsupported/Eigen/src/Polynomials/Companion.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/unsupported/Eigen/src/Polynomials/Companion.h b/unsupported/Eigen/src/Polynomials/Companion.h index 126be783b..6ab8f9714 100644 --- a/unsupported/Eigen/src/Polynomials/Companion.h +++ b/unsupported/Eigen/src/Polynomials/Companion.h @@ -75,8 +75,7 @@ class companion void setPolynomial( const VectorType& poly ) { const Index deg = poly.size()-1; - m_monic = Scalar(-1)/poly[deg] * poly.head(deg); - //m_bl_diag.setIdentity( deg-1 ); + m_monic = -poly.head(deg)/poly[deg]; m_bl_diag.setOnes(deg-1); } |