diff options
author | Gael Guennebaud <g.gael@free.fr> | 2012-04-11 09:48:01 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2012-04-11 09:48:01 +0200 |
commit | a3ddb144269efe714707efb5716f505c9f360b04 (patch) | |
tree | 833c2f28803100dc98457ea7350b4559c57c1dac /unsupported/test | |
parent | 51410975acbf713fe07a1573b4f04fafebb6f727 (diff) |
remove use of GSL in polynomialsolver unit test
Diffstat (limited to 'unsupported/test')
-rw-r--r-- | unsupported/test/CMakeLists.txt | 15 | ||||
-rw-r--r-- | unsupported/test/polynomialsolver.cpp | 30 |
2 files changed, 1 insertions, 44 deletions
diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index 36742012d..b34b151b1 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -79,20 +79,7 @@ else() ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ") endif() -find_package(GSL) -if(GSL_FOUND AND GSL_VERSION_MINOR LESS 9) - set(GSL_FOUND "") -endif(GSL_FOUND AND GSL_VERSION_MINOR LESS 9) -if(GSL_FOUND) - add_definitions("-DHAS_GSL" ${GSL_DEFINITIONS}) - include_directories(${GSL_INCLUDE_DIR}) - ei_add_property(EIGEN_TESTED_BACKENDS "GSL, ") -else(GSL_FOUND) - ei_add_property(EIGEN_MISSING_BACKENDS "GSL, ") - set(GSL_LIBRARIES " ") -endif(GSL_FOUND) - -ei_add_test(polynomialsolver " " "${GSL_LIBRARIES}" ) +ei_add_test(polynomialsolver) ei_add_test(polynomialutils) ei_add_test(kronecker_product) ei_add_test(splines) diff --git a/unsupported/test/polynomialsolver.cpp b/unsupported/test/polynomialsolver.cpp index 54b6657c9..28e034179 100644 --- a/unsupported/test/polynomialsolver.cpp +++ b/unsupported/test/polynomialsolver.cpp @@ -27,10 +27,6 @@ #include <iostream> #include <algorithm> -#ifdef HAS_GSL -#include "gsl_helper.h" -#endif - using namespace std; namespace Eigen { @@ -73,32 +69,6 @@ bool aux_evalSolver( const POLYNOMIAL& pols, SOLVER& psolve ) cerr << endl; } - #ifdef HAS_GSL - if (internal::is_same< Scalar, double>::value) - { - typedef GslTraits<Scalar> Gsl; - RootsType gslRoots(deg); - Gsl::eigen_poly_solve( pols, gslRoots ); - EvalRootsType gslEvr( deg ); - for( int i=0; i<gslRoots.size(); ++i ) - { - gslEvr[i] = std::abs( poly_eval( pols, gslRoots[i] ) ); - } - bool gslEvalToZero = gslEvr.isZero( test_precision<Scalar>() ); - if( !evalToZero ) - { - if( !gslEvalToZero ){ - cerr << "GSL also failed" << endl; } - else{ - cerr << "GSL did NOT failed" << endl; } - cerr << "GSL roots found: " << gslRoots.transpose() << endl; - cerr << "Abs value of the polynomial at the GSL roots: " << gslEvr.transpose() << endl; - cerr << endl; - } - } - #endif //< HAS_GSL - - std::vector<Scalar> rootModuli( roots.size() ); Map< EvalRootsType > aux( &rootModuli[0], roots.size() ); aux = roots.array().abs(); |