octave-maintainers
[Top][All Lists]
Advanced

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

MatrixType arguments to inverse and solve methods


From: John W. Eaton
Subject: MatrixType arguments to inverse and solve methods
Date: Mon, 2 Apr 2007 17:06:08 -0400

The changes to add the MatrixType class removed some prototypes for
the inverse and solve functions.  Is there any objection to the
following patch?  If not, then I'll make similar changes for the solve
methods before 2.9.11.  Do we have other backward compatibility
problems like this that are related to the addition of MatrixType?

Thanks,

jwe

2007-04-02  John W. Eaton  <address@hidden>

        * dMatrix.h, dMatrix.cc (Matrix::inverse): Reinstate versions
        without MatrixType argument.
        * CMatrix.h, CMatrix.cc (ComplexMatrix::inverse): Likewise.


Index: liboctave/dMatrix.h
===================================================================
RCS file: /cvs/octave/liboctave/dMatrix.h,v
retrieving revision 1.68
diff -u -u -r1.68 dMatrix.h
--- liboctave/dMatrix.h 6 Dec 2006 20:19:15 -0000       1.68
+++ liboctave/dMatrix.h 2 Apr 2007 21:02:34 -0000
@@ -116,6 +116,10 @@
 
 public:
   Matrix inverse (void) const;
+  Matrix inverse (octave_idx_type& info) const;
+  Matrix inverse (octave_idx_type& info, double& rcond, int force = 0,
+                 int calc_cond = 1) const;
+
   Matrix inverse (MatrixType &mattype) const;
   Matrix inverse (MatrixType &mattype, octave_idx_type& info) const;
   Matrix inverse (MatrixType &mattype, octave_idx_type& info, double& rcond,
Index: liboctave/dMatrix.cc
===================================================================
RCS file: /cvs/octave/liboctave/dMatrix.cc,v
retrieving revision 1.131
diff -u -u -r1.131 dMatrix.cc
--- liboctave/dMatrix.cc        7 Mar 2007 18:11:28 -0000       1.131
+++ liboctave/dMatrix.cc        2 Apr 2007 21:02:34 -0000
@@ -641,6 +641,22 @@
 }
 
 Matrix
+Matrix::inverse (octave_idx_type& info) const
+{
+  double rcond;
+  MatrixType mattype (*this);
+  return inverse (mattype, info, rcond, 0, 0);
+}
+
+Matrix
+Matrix::inverse (octave_idx_type& info, double& rcond, int force,
+                int calc_cond) const
+{
+  MatrixType mattype (*this);
+  return inverse (mattype, info, rcond, force, calc_cond);
+}
+
+Matrix
 Matrix::inverse (MatrixType& mattype) const
 {
   octave_idx_type info;
Index: liboctave/CMatrix.h
===================================================================
RCS file: /cvs/octave/liboctave/CMatrix.h,v
retrieving revision 1.61
diff -u -u -r1.61 CMatrix.h
--- liboctave/CMatrix.h 6 Dec 2006 20:19:14 -0000       1.61
+++ liboctave/CMatrix.h 2 Apr 2007 21:02:32 -0000
@@ -144,6 +144,10 @@
 
 public:
   ComplexMatrix inverse (void) const;
+  ComplexMatrix inverse (octave_idx_type& info) const;
+  ComplexMatrix inverse (octave_idx_type& info, double& rcond, int force = 0, 
+                        int calc_cond = 1) const;
+
   ComplexMatrix inverse (MatrixType &mattype) const;
   ComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info) const;
   ComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info,
Index: liboctave/CMatrix.cc
===================================================================
RCS file: /cvs/octave/liboctave/CMatrix.cc,v
retrieving revision 1.125
diff -u -u -r1.125 CMatrix.cc
--- liboctave/CMatrix.cc        7 Mar 2007 18:11:28 -0000       1.125
+++ liboctave/CMatrix.cc        2 Apr 2007 21:02:32 -0000
@@ -973,6 +973,22 @@
 }
 
 ComplexMatrix
+ComplexMatrix::inverse (octave_idx_type& info) const
+{
+  double rcond;
+  MatrixType mattype (*this);
+  return inverse (mattype, info, rcond, 0, 0);
+}
+
+ComplexMatrix
+ComplexMatrix::inverse (octave_idx_type& info, double& rcond, int force,
+                       int calc_cond) const
+{
+  MatrixType mattype (*this);
+  return inverse (mattype, info, rcond, 0, 0);
+}
+
+ComplexMatrix
 ComplexMatrix::inverse (MatrixType &mattype) const
 {
   octave_idx_type info;

reply via email to

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