Ryan Ringle
02-08-2008, 01:44 PM
Greetings,
I'm having difficulties passing a function to the Fitmrq routine. I have a class called fitTools where I have defined the fit function ( a simple Gaussian for testing called gaussFunc) and fit method. My question is how do I pass the function within the fit method? Doing
void fitTools::gaussFunc(...)
{
...
}
vector<double> fitTools::fitGaussFunc(...)
{
...
Fitmrq myfit(x,y,sd,a,gaussFunc,1e-3);
...
}
return a "no matching function call.." error upon compilation and lists gaussFunc as an <unknown type>. I've also tried making a pointer to the method within the fit method and passing that, to no avail. I'm assuming it's a problem with syntax that I don't understand. Any help would be appreciated.
Ryan
I'm having difficulties passing a function to the Fitmrq routine. I have a class called fitTools where I have defined the fit function ( a simple Gaussian for testing called gaussFunc) and fit method. My question is how do I pass the function within the fit method? Doing
void fitTools::gaussFunc(...)
{
...
}
vector<double> fitTools::fitGaussFunc(...)
{
...
Fitmrq myfit(x,y,sd,a,gaussFunc,1e-3);
...
}
return a "no matching function call.." error upon compilation and lists gaussFunc as an <unknown type>. I've also tried making a pointer to the method within the fit method and passing that, to no avail. I'm assuming it's a problem with syntax that I don't understand. Any help would be appreciated.
Ryan