changeset 30069:abf2e77cca42

maint: use "m_" prefix for member variables in class qrp. * qrp.cc, qrp.h: use "m_" prefix for member variables in class qrp.
author Rik <rik@octave.org>
date Sun, 29 Aug 2021 21:18:43 -0700
parents 97378503ee0a
children 2d662df32969
files liboctave/numeric/qrp.cc liboctave/numeric/qrp.h
diffstat 2 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/numeric/qrp.cc	Sun Aug 29 21:18:32 2021 -0700
+++ b/liboctave/numeric/qrp.cc	Sun Aug 29 21:18:43 2021 -0700
@@ -97,7 +97,7 @@
       // indices only!)
 
       jpvt -= static_cast<F77_INT> (1);
-      p = PermMatrix (jpvt, true);
+      m_p = PermMatrix (jpvt, true);
 
       form (n, afact, tau, qr_type);
     }
@@ -105,7 +105,7 @@
     template <>
     OCTAVE_API
     qrp<Matrix>::qrp (const Matrix& a, type qr_type)
-      : qr<Matrix> (), p ()
+      : qr<Matrix> (), m_p ()
     {
       init (a, qr_type);
     }
@@ -115,7 +115,7 @@
     RowVector
     qrp<Matrix>::Pvec (void) const
     {
-      Array<double> pa (p.col_perm_vec ());
+      Array<double> pa (m_p.col_perm_vec ());
       RowVector pv (MArray<double> (pa) + 1.0);
       return pv;
     }
@@ -168,7 +168,7 @@
       // indices only!)
 
       jpvt -= static_cast<F77_INT> (1);
-      p = PermMatrix (jpvt, true);
+      m_p = PermMatrix (jpvt, true);
 
       form (n, afact, tau, qr_type);
     }
@@ -176,7 +176,7 @@
     template <>
     OCTAVE_API
     qrp<FloatMatrix>::qrp (const FloatMatrix& a, type qr_type)
-      : qr<FloatMatrix> (), p ()
+      : qr<FloatMatrix> (), m_p ()
     {
       init (a, qr_type);
     }
@@ -186,7 +186,7 @@
     FloatRowVector
     qrp<FloatMatrix>::Pvec (void) const
     {
-      Array<float> pa (p.col_perm_vec ());
+      Array<float> pa (m_p.col_perm_vec ());
       FloatRowVector pv (MArray<float> (pa) + 1.0f);
       return pv;
     }
@@ -247,7 +247,7 @@
       // indices only!)
 
       jpvt -= static_cast<F77_INT> (1);
-      p = PermMatrix (jpvt, true);
+      m_p = PermMatrix (jpvt, true);
 
       form (n, afact, tau, qr_type);
     }
@@ -255,7 +255,7 @@
     template <>
     OCTAVE_API
     qrp<ComplexMatrix>::qrp (const ComplexMatrix& a, type qr_type)
-      : qr<ComplexMatrix> (), p ()
+      : qr<ComplexMatrix> (), m_p ()
     {
       init (a, qr_type);
     }
@@ -265,7 +265,7 @@
     RowVector
     qrp<ComplexMatrix>::Pvec (void) const
     {
-      Array<double> pa (p.col_perm_vec ());
+      Array<double> pa (m_p.col_perm_vec ());
       RowVector pv (MArray<double> (pa) + 1.0);
       return pv;
     }
@@ -326,7 +326,7 @@
       // indices only!)
 
       jpvt -= static_cast<F77_INT> (1);
-      p = PermMatrix (jpvt, true);
+      m_p = PermMatrix (jpvt, true);
 
       form (n, afact, tau, qr_type);
     }
@@ -334,7 +334,7 @@
     template <>
     OCTAVE_API
     qrp<FloatComplexMatrix>::qrp (const FloatComplexMatrix& a, type qr_type)
-      : qr<FloatComplexMatrix> (), p ()
+      : qr<FloatComplexMatrix> (), m_p ()
     {
       init (a, qr_type);
     }
@@ -344,7 +344,7 @@
     FloatRowVector
     qrp<FloatComplexMatrix>::Pvec (void) const
     {
-      Array<float> pa (p.col_perm_vec ());
+      Array<float> pa (m_p.col_perm_vec ());
       FloatRowVector pv (MArray<float> (pa) + 1.0f);
       return pv;
     }
--- a/liboctave/numeric/qrp.h	Sun Aug 29 21:18:32 2021 -0700
+++ b/liboctave/numeric/qrp.h	Sun Aug 29 21:18:43 2021 -0700
@@ -45,18 +45,18 @@
 
       typedef typename qr<T>::type type;
 
-      qrp (void) : qr<T> (), p () { }
+      qrp (void) : qr<T> (), m_p () { }
 
       OCTAVE_API qrp (const T&, type = qr<T>::std);
 
-      qrp (const qrp& a) : qr<T> (a), p (a.p) { }
+      qrp (const qrp& a) : qr<T> (a), m_p (a.m_p) { }
 
       qrp& operator = (const qrp& a)
       {
         if (this != &a)
           {
             qr<T>::operator = (a);
-            p = a.p;
+            m_p = a.m_p;
           }
 
         return *this;
@@ -66,13 +66,13 @@
 
       OCTAVE_API void init (const T&, type = qr<T>::std);
 
-      PermMatrix P (void) const { return p; }
+      PermMatrix P (void) const { return m_p; }
 
       OCTAVE_API RV_T Pvec (void) const;
 
     private:
 
-      PermMatrix p;
+      PermMatrix m_p;
     };
   }
 }