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]

Problem with matrices bigger than 2x2 using gsl_linalg_LU_invert


Hi all,
 
First of all, thank you for having created such a great library. I have
a small problem with gsl_linalg_LU_invert. I am using a 4x4 matrix which
is not singular. I made a LU decomposition using gsl_linalg_LU_decomp.
Then, I send it to gsl_linalg_LU_invert and it crashes. I tried with a
2x2 matrix and it works perfectly well. When debugging, I saw that at
the third iteration (i=2) of 
  for (i = 0; i < n; i++)
    {
      gsl_vector_view c = gsl_matrix_column (inverse, i);
      int status_i = gsl_linalg_LU_svx (LU, p, &(c.vector));
 
      if (status_i)
            status = status_i;
    }
inside decomp, c.vector.size=4 but, in invert, the side of x (which
should be c.vector.size) is 1239492! I verified that the program also
crashes with a 3x3 matrix. Is it a bug or did I make something wrong.
Please apologize if I don't send my code, it is well too big.
 
Thank you
 
Philippe



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