Hi, I would like to know how to define a arbitrary mathematical
function with one variable and a list of paramter, like, f(x). For
example, in GSL library this is done as
/* Definition of an arbitrary function with parameters */
struct gsl_function_struct
{
double (* function) (double x, void * params);
void * params;
};
typedef struct gsl_function_struct gsl_function ;
#define GSL_FN_EVAL(F,x) (*((F)->function))(x,(F)->params)
and the usage is here:
http://www.gnu.org/software/gsl/manu...ction-to-solve
I wonder how one does it in C++?
Thanks.