octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8622] basic matrix functions


From: Jordi Gutiérrez Hermoso
Subject: [Octave-patch-tracker] [patch #8622] basic matrix functions
Date: Mon, 16 Mar 2015 13:53:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0 Iceweasel/36.0.1

Update of patch #8622 (project octave):

                Priority:                7 - High => 1 - Later              
                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

I am sorry to say this, but I do not think there is much value to these
contributions.

The problem is numerical stability. The adjugate and cofactors of a matrix are
essentially numerically useless, in part because the determinant itself is
numerically useless. Near singular matrices can have large determinants and
well-conditioned matrices can have small determinants. See Golub & Van Loan,
section 2.7.3, "Determinants and Nearness to Singularity."

Even if we decide to include these functions with the proviso that it is in
fact impossible to properly handle numerical error, we certainly cannot accept
a cut-and-paste job:

   
https://en.wikipedia.org/wiki/Copy_and_paste_programming#/media/File:Forgotten_edits_in_copypaste_programming.gif

If you disagree strongly, a first step to convince me to accept these
functions is to modify them to not be nearly identical to each other, a second
step would be to follow Octave style (e.g. comments with #, not with %), and a
third step would be to come up with some way to handle numerical error.

The adjugate also has one further disadvantage: it's just about the worst
possible way to compute an inverse. In addition to the unstability problems
described above, it is also the most computationally expensive, with
complexity well above O(n^3), depending on the determinant implementation. If
done symbolically, like in a CAS, the adjugate is O(n!), just about the worst
possible.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8622>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]