changeset 29902:3cb8519fed0f

Use LU factorization to solve (close to) singular full matrices. * liboctave/array/CMatrix.cc (ComplexMatrix::fsolve), liboctave/array/dMatrix.cc (Matrix::fsolve), liboctave/array/fCMatrix.cc (FloatComplexMatrix::fsolve), liboctave/array/fMatrix.cc (FloatMatrix::fsolve): Continue with LU decomposition also for (close to) singular full matrices. See also: https://octave.discourse.group/t/1365
author Markus Mützel <markus.muetzel@gmx.de>
date Wed, 21 Jul 2021 18:51:54 +0200
parents ee84485289ce
children ef865fcd4611
files liboctave/array/CMatrix.cc liboctave/array/dMatrix.cc liboctave/array/fCMatrix.cc liboctave/array/fMatrix.cc
diffstat 4 files changed, 0 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/array/CMatrix.cc	Wed Jul 21 09:42:28 2021 -0700
+++ b/liboctave/array/CMatrix.cc	Wed Jul 21 18:51:54 2021 +0200
@@ -1866,8 +1866,6 @@
 
                   if (rcond_plus_one == 1.0 || octave::math::isnan (rcon))
                     {
-                      info = -2;
-
                       if (sing_handler)
                         sing_handler (rcon);
                       else
--- a/liboctave/array/dMatrix.cc	Wed Jul 21 09:42:28 2021 -0700
+++ b/liboctave/array/dMatrix.cc	Wed Jul 21 18:51:54 2021 +0200
@@ -1535,8 +1535,6 @@
 
                   if (rcond_plus_one == 1.0 || octave::math::isnan (rcon))
                     {
-                      info = -2;
-
                       if (sing_handler)
                         sing_handler (rcon);
                       else
--- a/liboctave/array/fCMatrix.cc	Wed Jul 21 09:42:28 2021 -0700
+++ b/liboctave/array/fCMatrix.cc	Wed Jul 21 18:51:54 2021 +0200
@@ -1876,8 +1876,6 @@
 
                   if (rcond_plus_one == 1.0 || octave::math::isnan (rcon))
                     {
-                      info = -2;
-
                       if (sing_handler)
                         sing_handler (rcon);
                       else
--- a/liboctave/array/fMatrix.cc	Wed Jul 21 09:42:28 2021 -0700
+++ b/liboctave/array/fMatrix.cc	Wed Jul 21 18:51:54 2021 +0200
@@ -1555,8 +1555,6 @@
 
                   if (rcond_plus_one == 1.0 || octave::math::isnan (rcon))
                     {
-                      info = -2;
-
                       if (sing_handler)
                         sing_handler (rcon);
                       else