changeset 1880:cbdbec67ad60

[project @ 1996-02-05 17:10:31 by jwe]
author jwe
date Mon, 05 Feb 1996 17:10:31 +0000
parents 1b43d3c06c04
children 950825cea083
files liboctave/dbleSVD.h
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/dbleSVD.h	Mon Feb 05 16:31:44 1996 +0000
+++ b/liboctave/dbleSVD.h	Mon Feb 05 17:10:31 1996 +0000
@@ -33,10 +33,9 @@
 #include "dDiagMatrix.h"
 #include "dMatrix.h"
 
-class SVD
+class
+SVD
 {
-friend class Matrix;
-
 public:
 
   enum type
@@ -48,7 +47,6 @@
 
   SVD (void) { }
 
-
   SVD (const Matrix& a, type svd_type = SVD::std) { init (a, svd_type); }
 
   SVD (const Matrix& a, int& info, type svd_type = SVD::std)
@@ -65,9 +63,12 @@
 
   SVD& operator = (const SVD& a)
     {
-      sigma = a.sigma;
-      left_sm = a.left_sm;
-      right_sm = a.right_sm;
+      if (this != &a)
+	{
+	  sigma = a.sigma;
+	  left_sm = a.left_sm;
+	  right_sm = a.right_sm;
+	}
 
       return *this;
     }
@@ -82,13 +83,13 @@
 
 private:
 
-  int init (const Matrix& a, type svd_type = std);
-
   SVD::type type_computed;
 
   DiagMatrix sigma;
   Matrix left_sm;
   Matrix right_sm;
+
+  int init (const Matrix& a, type svd_type = std);
 };
 
 #endif