Mercurial > hg > octave-nkf
diff liboctave/CmplxHESS.h @ 1881:950825cea083
[project @ 1996-02-05 18:07:21 by jwe]
author | jwe |
---|---|
date | Mon, 05 Feb 1996 18:07:21 +0000 |
parents | dc527156c38c |
children | 682f31b20894 |
line wrap: on
line diff
--- a/liboctave/CmplxHESS.h +++ b/liboctave/CmplxHESS.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* -Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton +Copyright (C) 1996 John W. Eaton This file is part of Octave. @@ -32,29 +32,27 @@ #include "CMatrix.h" -class ComplexHESS +class +ComplexHESS { -friend class ComplexMatrix; - public: - ComplexHESS (void) { } + ComplexHESS (void) : hess_mat (), unitary_hess_mat () { } ComplexHESS (const ComplexMatrix& a) { init (a); } ComplexHESS (const ComplexMatrix& a, int& info) { info = init (a); } ComplexHESS (const ComplexHESS& a) - { - hess_mat = a.hess_mat; - unitary_hess_mat = a.unitary_hess_mat; - } + : hess_mat (a.hess_mat), unitary_hess_mat (a.unitary_hess_mat) { } ComplexHESS& operator = (const ComplexHESS& a) { - hess_mat = a.hess_mat; - unitary_hess_mat = a.unitary_hess_mat; - + if (this != &a) + { + hess_mat = a.hess_mat; + unitary_hess_mat = a.unitary_hess_mat; + } return *this; } @@ -69,10 +67,10 @@ private: - int init (const ComplexMatrix& a); - ComplexMatrix hess_mat; ComplexMatrix unitary_hess_mat; + + int init (const ComplexMatrix& a); }; #endif