Hi,
I have a class called function:
[code]class function
{
private:
int points_m;
math_objects::vector x_m;
math_objects::vector y_m;
Base_interp* interp_m;
enum interpolations{linear, polynomial, cubic_spline, b_spline, rational, bary_rational};
static mapstd::string,interpolations interp_map_enum;
public:
function(int num_points, const math_objects::vector& x, const math_objects::vector& y, std::string& interp_type);
~function();
double operator()(double abscissa) const;
double operator()(double *x, double *par);
}[/code]
I am trying to create a TF! object so that I can call my operator method (double operator() (double *x, double * par)
I tried something like:
function *fn1=new function(2, v1, v2, type); and then
TF1 * f = new TF1(“f”,fn1,1,5,0);
This didn’t work. I think I need a pointer to the overloaded operator method () itself. However, I wasn’t sure of the correct syntax. I did look at the examples on the Web. However, these didn’t answer my question.
Look forward to any suggestions on this.
Thanks.
-Jon