diff liboctave/numeric/aepbalance.h @ 22329:7f3c7a8bd131

maint: Indent namespaces in liboctave/numeric files.
author John W. Eaton <jwe@octave.org>
date Wed, 17 Aug 2016 10:55:38 -0400
parents bac0d6f07a3e
children 4caa7b28d183
line wrap: on
line diff
--- a/liboctave/numeric/aepbalance.h	Wed Aug 17 10:37:57 2016 -0400
+++ b/liboctave/numeric/aepbalance.h	Wed Aug 17 10:55:38 2016 -0400
@@ -28,101 +28,99 @@
 
 namespace octave
 {
-namespace math
-{
+  namespace math
+  {
+    template <typename MT>
+    class aepbalance
+    {
+    public:
+
+      typedef typename MT::real_column_vector_type VT;
 
-template <typename MT>
-class aepbalance
-{
-public:
+      aepbalance (void) : balanced_mat (), scale (), ilo (), ihi (), job () { }
+
+      aepbalance (const MT& a, bool noperm = false, bool noscal = false);
 
-  typedef typename MT::real_column_vector_type VT;
-
-  aepbalance (void) : balanced_mat (), scale (), ilo (), ihi (), job () { }
-
-  aepbalance (const MT& a, bool noperm = false, bool noscal = false);
+      aepbalance (const aepbalance& a)
+        : balanced_mat (a.balanced_mat), scale (a.scale),
+          ilo(a.ilo), ihi(a.ihi), job(a.job)
+      {
+      }
 
-  aepbalance (const aepbalance& a)
-    : balanced_mat (a.balanced_mat), scale (a.scale),
-      ilo(a.ilo), ihi(a.ihi), job(a.job)
-  {
-  }
+      aepbalance& operator = (const aepbalance& a)
+      {
+        if (this != &a)
+          {
+            balanced_mat = a.balanced_mat;
+            scale = a.scale;
+            ilo = a.ilo;
+            ihi = a.ihi;
+            job = a.job;
+          }
 
-  aepbalance& operator = (const aepbalance& a)
-  {
-    if (this != &a)
+        return *this;
+      }
+
+      virtual ~aepbalance (void) { }
+
+      MT balancing_matrix (void) const;
+
+      MT balanced_matrix (void) const
       {
-        balanced_mat = a.balanced_mat;
-        scale = a.scale;
-        ilo = a.ilo;
-        ihi = a.ihi;
-        job = a.job;
+        return balanced_mat;
       }
 
-    return *this;
-  }
-
-  virtual ~aepbalance (void) { }
+      VT permuting_vector (void) const
+      {
+        octave_idx_type n = balanced_mat.rows ();
 
-  MT balancing_matrix (void) const;
+        VT pv (n);
 
-  MT balanced_matrix (void) const
-  {
-    return balanced_mat;
-  }
+        for (octave_idx_type i = 0; i < n; i++)
+          pv(i) = i+1;
 
-  VT permuting_vector (void) const
-  {
-    octave_idx_type n = balanced_mat.rows ();
-
-    VT pv (n);
+        for (octave_idx_type i = n-1; i >= ihi; i--)
+          {
+            octave_idx_type j = scale(i) - 1;
+            std::swap (pv(i), pv(j));
+          }
 
-    for (octave_idx_type i = 0; i < n; i++)
-      pv(i) = i+1;
+        for (octave_idx_type i = 0; i < ilo-1; i++)
+          {
+            octave_idx_type j = scale(i) - 1;
+            std::swap (pv(i), pv(j));
+          }
 
-    for (octave_idx_type i = n-1; i >= ihi; i--)
-      {
-        octave_idx_type j = scale(i) - 1;
-        std::swap (pv(i), pv(j));
+        return pv;
       }
 
-    for (octave_idx_type i = 0; i < ilo-1; i++)
+      VT scaling_vector (void) const
       {
-        octave_idx_type j = scale(i) - 1;
-        std::swap (pv(i), pv(j));
+        octave_idx_type n = balanced_mat.rows ();
+
+        VT scv (n);
+
+        for (octave_idx_type i = 0; i < ilo-1; i++)
+          scv(i) = 1;
+
+        for (octave_idx_type i = ilo-1; i < ihi; i++)
+          scv(i) = scale(i);
+
+        for (octave_idx_type i = ihi; i < n; i++)
+          scv(i) = 1;
+
+        return scv;
       }
 
-    return pv;
-  }
-
-  VT scaling_vector (void) const
-  {
-    octave_idx_type n = balanced_mat.rows ();
-
-    VT scv (n);
-
-    for (octave_idx_type i = 0; i < ilo-1; i++)
-      scv(i) = 1;
-
-    for (octave_idx_type i = ilo-1; i < ihi; i++)
-      scv(i) = scale(i);
+    protected:
 
-    for (octave_idx_type i = ihi; i < n; i++)
-      scv(i) = 1;
-
-    return scv;
+      MT balanced_mat;
+      VT scale;
+      octave_idx_type ilo;
+      octave_idx_type ihi;
+      char job;
+    };
   }
-
-protected:
-
-  MT balanced_mat;
-  VT scale;
-  octave_idx_type ilo;
-  octave_idx_type ihi;
-  char job;
-};
-
-}
 }
 
 #endif