From 89f2d5667fd1ace51ab3e05ad614adbbcff8dab8 Mon Sep 17 00:00:00 2001 From: Manuel Yguel Date: Thu, 25 Mar 2010 03:25:47 +0100 Subject: [PATCH] Add the possibility to use the polynomial solver of the gsl. --- test/gsl_helper.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/gsl_helper.h b/test/gsl_helper.h index f8f7a5d79..eefffe792 100644 --- a/test/gsl_helper.h +++ b/test/gsl_helper.h @@ -33,6 +33,7 @@ #include #include #include +#include namespace Eigen { @@ -69,6 +70,27 @@ template::IsComplex> struct gsl_eigen_gensymmv_free(w); free(a); } + + template + static void eigen_poly_solve(const EIGEN_VECTOR& poly, EIGEN_ROOTS& roots ) + { + const int deg = poly.size()-1; + double *z = new double[2*deg]; + double *a = new double[poly.size()]; + for( int i=0; i struct GslTraits