This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

complex polynomials


Hi all

Ive been looking into the possibility of porting
an algorithm for calculating the maximum modulus
of a complex polynomial to GSL. The algortithm is
described in SINUM 83 (2000), also available at

  http://www.vindaloo.uklinux.net/jjg/papers/

Would there be an interest in having this included
in GSL?

If so, then could I request some clarification on
GSL design standards:

 - the algorithm uses adaptive subdivision and
   there are no hard bounds on the amount of memory
   needed. I read in the design guide that allocation
   should be left to the calling function, so I
   guess it (the calling routine) should look something
   like

   gsl_complex_poly *p;
   gsl_maxmod_workspace *w;
   int n = 200;
   double max;

   w = gsl_maxmod_alloc(n);

   max = gsl_maxmod(p,w,&err);

   while (err == GSL_MAXMOD_EOMEM)
   {
      n *= 2;
      w = gsl_maxmod_realloc(n,w);
      m = gsl_maxmod(p,w,&err);
   }

   gsl_maxmod_free(w);

   does that look about right?

 - I'll need a complex polynomial type (and Horner evalaution)
   but gsl_poly.h defines operations on real polynomaials.
   Would there be interest in a seperate gsl_cpoly.h ?

Cheers

Jim
-- 
J. J. Green, Department of Applied Mathematics, Hicks Bd.,
Hounsfield Rd.,  University of Sheffield,  Sheffield, UK.
+44 (0114) 222 3742,  http://www.vindaloo.uklinux.net/jjg



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]