| 1 |
/* |
| 2 |
* Library: lmfit (Levenberg-Marquardt least squares fitting) |
| 3 |
* |
| 4 |
* File: lmcurve.h |
| 5 |
* |
| 6 |
* Contents: Declares lmcurve, a simplified API for curve fitting |
| 7 |
* using the generic Levenberg-Marquardt routine lmmin. |
| 8 |
* |
| 9 |
* Copyright: Joachim Wuttke, Forschungszentrum Juelich GmbH (2004-2013) |
| 10 |
* |
| 11 |
* License: see ../COPYING (FreeBSD) |
| 12 |
* |
| 13 |
* Homepage: apps.jcns.fz-juelich.de/lmfit |
| 14 |
* |
| 15 |
* Note to programmers: Don't patch and fork, but copy and variate! |
| 16 |
* If you need to compute residues differently, then please do not patch |
| 17 |
* lmcurve.h, but copy it to a differently named file, and change lmcurve() |
| 18 |
* into a differently named function declaration, like we have done in |
| 19 |
* lmcurve_tyd.h. |
| 20 |
*/ |
| 21 |
|
| 22 |
#ifndef LMCURVE_H |
| 23 |
#define LMCURVE_H |
| 24 |
#undef __BEGIN_DECLS |
| 25 |
#undef __END_DECLS |
| 26 |
#ifdef __cplusplus |
| 27 |
#define __BEGIN_DECLS extern "C" { |
| 28 |
#define __END_DECLS } |
| 29 |
#else |
| 30 |
#define __BEGIN_DECLS /* empty */ |
| 31 |
#define __END_DECLS /* empty */ |
| 32 |
#endif |
| 33 |
|
| 34 |
#include<lmstruct.h> |
| 35 |
|
| 36 |
__BEGIN_DECLS |
| 37 |
|
| 38 |
void lmcurve( |
| 39 |
const int n_par, double* par, const int m_dat, |
| 40 |
const double* t, const double* y, |
| 41 |
double (*g)(const double t, const double* par), |
| 42 |
const lm_control_struct* control, lm_status_struct* status); |
| 43 |
|
| 44 |
__END_DECLS |
| 45 |
#endif /* LMCURVE_H */ |