diff options
Diffstat (limited to 'unsupported/test/polynomialsolver.cpp')
-rw-r--r-- | unsupported/test/polynomialsolver.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/unsupported/test/polynomialsolver.cpp b/unsupported/test/polynomialsolver.cpp index de79f1538..0c87478dd 100644 --- a/unsupported/test/polynomialsolver.cpp +++ b/unsupported/test/polynomialsolver.cpp @@ -38,6 +38,9 @@ bool aux_evalSolver( const POLYNOMIAL& pols, SOLVER& psolve ) const Index deg = pols.size()-1; + // Test template constructor from coefficient vector + SOLVER solve_constr (pols); + psolve.compute( pols ); const RootsType& roots( psolve.roots() ); EvalRootsType evr( deg ); @@ -104,6 +107,7 @@ void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const // 1) the roots found are correct // 2) the roots have distinct moduli + typedef typename POLYNOMIAL::Scalar Scalar; typedef typename REAL_ROOTS::Scalar Real; //Test realRoots @@ -118,7 +122,7 @@ void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const bool found = false; for( size_t j=0; j<calc_realRoots.size()&& !found; ++j ) { - if( internal::isApprox( calc_realRoots[i], real_roots[j] ), psPrec ){ + if( internal::isApprox( calc_realRoots[i], real_roots[j], psPrec ) ){ found = true; } } VERIFY( found ); @@ -209,5 +213,6 @@ void test_polynomialsolver() CALL_SUBTEST_10((polynomialsolver<double,Dynamic>( internal::random<int>(9,13) )) ); + CALL_SUBTEST_11((polynomialsolver<float,Dynamic>(1)) ); } } |