This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Bug in gsl_linalg_bidiag_unpack_B
- From: "Fabian Jakobs" <fabian dot jakobs at web dot de>
- To: gsl-discuss at sources dot redhat dot com
- Date: Mon, 12 Aug 2002 14:35:12 +0200
- Subject: Bug in gsl_linalg_bidiag_unpack_B
- Organization: http://freemail.web.de/
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