public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Alan Aspuru-Guzik <aspuru@okra.cchem.Berkeley.edu>
To: Przemyslaw Sliwa <sliwa@euv-frankfurt-o.de>
Cc: gsl-discuss@sources.redhat.com
Subject: Re: Determinant of a matrix
Date: Tue, 23 Jul 2002 10:35:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.21.0207231042470.13392-100000@okra.cchem.Berkeley.edu> (raw)
In-Reply-To: <3D3D8C3A.8030003@euv-frankfurt-o.de>

I already answered the question to you before (the 28th of May)!
http://sources.redhat.com/ml/gsl-discuss/2002-q2/msg00197.html

There is a lot of stuff that you don't need in that code, but it is easy
to figure out... (here I tried to be more explicit than in the previous
post)

x ludecomp and matrix are matrices
x perm is a permutation
x det is a double, s is an integer

//this copies the matrix, I like this, so I can still have it afterwards
//otherwise you will get the LU decomposition and loose your original
//matrix
gsl_matrix_memcopy(ludecomp,matrix);

//get the LU decomposition
gsl_linalg_LU_decomp(ludecomp,perm,&s);
//get the determinant
det =gsl_linalg_LU_det(ludecomp,s);

Let me know if you have any problems,

Alan

On Tue, 23 Jul 2002, Przemyslaw Sliwa wrote:

> Does anyone know how to compute in an easy way the determinant of a real 
> matrix?
> 
> Thanx for hinst.
> 
> Przem
> 

-- 

Alan Aspuru-Guzik                    Dios mueve al jugador, y éste, la pieza.
(510)642-5911 UC Berkeley           ¿Qué Dios detrás de Dios la trama empieza
(925)422-8739 LLNL                de polvo y tiempo y sueño y agonías? -Borges

  reply	other threads:[~2002-07-23 17:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23 10:03 Przemyslaw Sliwa
2002-07-23 10:35 ` Alan Aspuru-Guzik [this message]
2002-07-23 10:44 ` Dan, Ho-Jin
2002-10-22  3:12 Przemyslaw Sliwa
2002-10-22  7:20 ` Gert Van den Eynde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.21.0207231042470.13392-100000@okra.cchem.Berkeley.edu \
    --to=aspuru@okra.cchem.berkeley.edu \
    --cc=gsl-discuss@sources.redhat.com \
    --cc=sliwa@euv-frankfurt-o.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).