#ifndef _RESIDFUNC_H_ #define _RESIDFUNC_H_ class residFunc { public: virtual ~residFunc(); virtual void resid(const vector *x, void *data, vector *f) = 0; virtual void deriv(const vector *x, void *data, vector< vector > *J) = 0; virtual void residAndDeriv(const vector *x, void *data, vector *f, vector< vector > *J) = 0; virtual unsigned int getn() = 0; virtual unsigned int getp() = 0; }; extern "C" { #include #include #include int fGsl(const gsl_vector *x, void *data, gsl_vector *f); int dfGsl(const gsl_vector *x, void *data, gsl_matrix *J); int fdfGsl(const gsl_vector *x, void *data, gsl_vector *f, gsl_matrix *J); } #endif // _RESIDFUNC_H_