public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* libevaluator library and GSL
@ 2003-09-04 17:50 Aleksandar B. Samardzic
  2003-09-04 18:26 ` Martin Jansche
  2003-09-05 10:38 ` Brian Gough
  0 siblings, 2 replies; 9+ messages in thread
From: Aleksandar B. Samardzic @ 2003-09-04 17:50 UTC (permalink / raw)
  To: gsl-discuss

I've written a library
(http://savannah.nongnu.org/projects/libevaluator/) that makes possible
to parse strings representing mathematical functions over single or
multiple variables and later to evaluate these functions for different
variable values (also to create representation of function derivative
over specified variable etc.).  I've submitted this library for
evaluation regarding inclusion in GNU project and was told by my
evaluator that they would rather like to see my library as part of GSL
than to publish it as separate library.  My library is written in C, but
offers also Fortran 77 and Gule interfaces (as well as Fortran 90
interface).  Note also that my library has simple interface that I could
easily change to behave in spirit of GSL.  Something that could make it
possible to write code like this:

  gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000);
  gsl_function F;
  double result, error;
  gsl_evaluator *evaluator; /* type provided by my library */

  evaluator = gsl_evaluator_create("x^7-3*x^2+x");
  F.function = &gsl_evaluator_evaluate_x; /* function provided by my library */
  F.params = evaluator;
  gsl_integration_qags (&F, 0, 1, 0, 1e-7, 1000, w, &result, &error);

  /* now interested in integrating function derivative (just for fun)? */
  F.params = evaluator_derivative_x (evaluator);
  gsl_integration_qags (&F, 0, 1, 0, 1e-7, 1000, w, &result, &error);

So, main idea is to have user to provide string representing
mathematical function instead of to write C function representing
mathematical function.  Any interest for alike functionality in GSL?

Regards,
Alex

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-09-05 18:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-04 17:50 libevaluator library and GSL Aleksandar B. Samardzic
2003-09-04 18:26 ` Martin Jansche
2003-09-05  7:32   ` Aleksandar B. Samardzic
2003-09-05  8:04     ` Kenneth Geisshirt
2003-09-05 11:36       ` Alberto Manuel Brandão Simões
2003-09-05 18:18         ` James Amundson
2003-09-05 10:38 ` Brian Gough
2003-09-05 12:21   ` Aleksandar B. Samardzic
2003-09-05 12:47     ` Juan Jose Gomez Cadenas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).