public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Problem with matrices bigger than 2x2 using gsl_linalg_LU_invert
@ 2002-08-19  3:42 Philippe Huber
  2002-08-19 11:32 ` Brian Gough
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Huber @ 2002-08-19  3:42 UTC (permalink / raw)
  To: gsl-discuss

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with matrices bigger than 2x2 using gsl_linalg_LU_invert
  2002-08-19  3:42 Problem with matrices bigger than 2x2 using gsl_linalg_LU_invert Philippe Huber
@ 2002-08-19 11:32 ` Brian Gough
  2002-08-19 12:39   ` RE : " Philippe Huber
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Gough @ 2002-08-19 11:32 UTC (permalink / raw)
  To: Philippe Huber; +Cc: gsl-discuss

Philippe Huber writes:
 > 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.  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.

Please send a small example which reproduces the bug, with details of 
your operating system, compiler, etc.
regards
Brian Gough

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE : Problem with matrices bigger than 2x2 using gsl_linalg_LU_invert
  2002-08-19 11:32 ` Brian Gough
@ 2002-08-19 12:39   ` Philippe Huber
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Huber @ 2002-08-19 12:39 UTC (permalink / raw)
  To: gsl-discuss

Dear Brian,

I found the error: I had not included two gsl source files into my
project: rowcol.c and view.c which contain functions called in
gsl_linalg_LU_invert. As a reminder, to make gsl work with Borland
Builder C++, it is necessary to include the source codes in the project.
The libraries (even the bcc ones) contain errors like bad entry points.

Thank you

Phil

-----Message d'origine-----
De : Brian Gough [mailto:bjg@network-theory.co.uk] 
Envoyé : lundi, 19. août 2002 20:32
À : Philippe Huber
Cc : gsl-discuss@sources.redhat.com
Objet : Re: Problem with matrices bigger than 2x2 using
gsl_linalg_LU_invert

Philippe Huber writes:
 > 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.  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.

Please send a small example which reproduces the bug, with details of 
your operating system, compiler, etc.
regards
Brian Gough



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-19 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19  3:42 Problem with matrices bigger than 2x2 using gsl_linalg_LU_invert Philippe Huber
2002-08-19 11:32 ` Brian Gough
2002-08-19 12:39   ` RE : " Philippe Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).