This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Some (probably) ridiculous questions
- To: redonnetNO at SPAMlgmt dot ups-tlse dot fr
- Subject: Re: Some (probably) ridiculous questions
- From: Brian Gough <bjg at network-theory dot co dot uk>
- Date: Fri, 6 Jul 2001 16:35:56 +0100 (BST)
- Cc: gsl-discuss at sourceware dot cygnus dot com
- References: <01070611531200.01910@lgmt-fab5.ups-tlse.fr>
- Reply-To: gsl-discuss at sources dot redhat dot com
Jean-Max Redonnet writes:
> Sorry, if this point is obvious, but I'm not very familiar with GSL and I
> would like to use it in the right way.
>
> My question is : How to declare a function of multiple variables ?
>
> I manage with parametric curves and surfaces, so I need functions of one or
> two parameters. Futhermore This functions should be vectorial.
> For example : I need to deal with a ruled surface.
Hello,
The gsl_function type is mainly designed for interfacing to the
univariate gsl routines. It is not really a general facility so it
does not handle other cases that are not used in the library, such as
surfaces.
The way to handle this sort of situation is,
-- define your own surface function type in the way that you normally
would in your C-programs
-- if you need to use a gsl routine, for example to integrate along a
line, define a function to create the appropriate gsl_function by
mapping from your surface type.
Philosophically, calls to GSL routines, and the GSL types, can be at a
"lower-level" than your program.
regards
Brian Gough