diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-12-14 20:35:34 +0100 | 
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-12-14 20:35:34 +0100 | 
| commit | e5cf8deee23f97e1215c977a7b1d039f9901a21a (patch) | |
| tree | 79376798cc79825abff172a9d8dbba66baa62db7 /src | |
| parent | 52bcb63b5d8db6627c20c097f0c20df28e6918fc (diff) | |
fix number of params (now 8)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ProjectionTangentialLSQ.cxx | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/ProjectionTangentialLSQ.cxx b/src/ProjectionTangentialLSQ.cxx index 243d0dc..3afa2e3 100644 --- a/src/ProjectionTangentialLSQ.cxx +++ b/src/ProjectionTangentialLSQ.cxx @@ -178,14 +178,14 @@ lsq_fdf (const gsl_vector * x, void *data, gsl_vector * f, gsl_matrix * J) {  	return GSL_SUCCESS;  } - +#define NUM_PARAMS 8  int  ProjectionTangentialLSQ::lsq(const Hills *h, ViewParams *parms) {  	const gsl_multifit_fdfsolver_type *T;  	gsl_multifit_fdfsolver *s;  	gsl_multifit_function_fdf f;  	struct data dat; -	double x_init[8]; +	double x_init[NUM_PARAMS];  	gsl_vector_view x;  	int status; @@ -200,20 +200,20 @@ ProjectionTangentialLSQ::lsq(const Hills *h, ViewParams *parms) {  	x_init[6] = parms->u0;  	x_init[7] = parms->v0; -	x = gsl_vector_view_array (x_init, 8); +	x = gsl_vector_view_array (x_init, NUM_PARAMS);     f.f = &lsq_f;     f.df = &lsq_df;     f.fdf = &lsq_fdf;     f.n = h->get_num() * 2; -   f.p = 6; +   f.p = NUM_PARAMS;     f.params = &dat;  	T = gsl_multifit_fdfsolver_lmsder; -	s = gsl_multifit_fdfsolver_alloc (T, h->get_num() * 2, 8); +	s = gsl_multifit_fdfsolver_alloc (T, h->get_num() * 2, NUM_PARAMS);  	gsl_multifit_fdfsolver_set (s, &f, &x.vector); -    for (int i=0; i<30; i++) { +    for (int i=0; i<10; i++) {  		status = gsl_multifit_fdfsolver_iterate (s);  		fprintf(stderr, "gsl_multifit_fdfsolver_iterate: status %d\n", status); | 
