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]

Bug in gsl_linalg_bidiag_unpack_B


Hello,

I think I have found a bug in gsl_linalg_bidiag_unpack_B in linalg/bidiag.c. The function is supposed to return the superdiagonal of the matrix A but returns the subdiagonal of this matrix. gsl_linalg_bidiag_unpack returns the correct values.

Compare theese two parts of code:
gsl_linalg_bidiag_unpack:
      /* Copy superdiagonal into superdiag */
      for (i = 0; i < N - 1; i++)
        {
          double Aij = gsl_matrix_get (A, i, i+1);
          gsl_vector_set (superdiag, i, Aij);
        }

gsl_linalg_bidiag_unpack_B:
      /* Copy superdiagonal into superdiag */
      for (i = 0; i < K - 1; i++)
        {
          double Aij = gsl_matrix_get (A, i+1, i);
          gsl_vector_set (superdiag, i, Aij);
        }

The indices of gsl_matrix_get are mixed up.

regards Fabian Jakobs

______________________________________________________________________________
Die clevere Geldreserve: der DiBa-Privatkredit. Funktioniert wie ein Dispo, 
ist aber viel gunstiger! Alle Infos: http://diba.web.de/?mc=021104


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