This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

minor copy-paste typo in gsl documentation


There is a minor typo in chapter on Multidimensional Root-Finding in GSL 
reference manual. http://sources.redhat.com/gsl/ref/gsl-ref_33.html#SEC434

There is an example program:

int
powell_df (gsl_vector * x, void * p, gsl_matrix * J) 
{
   struct powell_params * params 
     = *(struct powell_params *)p;
   double A = (params->A);
   double x0 = gsl_vector_get(x,0);
   double x1 = gsl_vector_get(x,1);
   gsl_vector_set (J, 0, 0, A * x1)
   gsl_vector_set (J, 0, 1, A * x0)
   gsl_vector_set (J, 1, 0, -exp(-x0))
   gsl_vector_set (J, 1, 1, -exp(-x1))
   return GSL_SUCCESS
}

Obviously instead of gsl_vector_set should be gsl_matrix_set ;-).

Slaven


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]