Mercurial > hg > octave-nkf
annotate liboctave/numeric/dbleHESS.h @ 20830:b65888ec820e draft default tip gccjit
dmalcom gcc jit import
author | Stefan Mahr <dac922@gmx.de> |
---|---|
date | Fri, 27 Feb 2015 16:59:36 +0100 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
457 | 1 /* |
2 | |
19898
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17822
diff
changeset
|
3 Copyright (C) 1994-2015 John W. Eaton |
457 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
457 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
457 | 20 |
21 */ | |
22 | |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
23 #if !defined (octave_dbleHESS_h) |
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
24 #define octave_dbleHESS_h 1 |
457 | 25 |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
26 #include <iosfwd> |
457 | 27 |
28 #include "dMatrix.h" | |
29 | |
1881 | 30 class |
6108 | 31 OCTAVE_API |
1881 | 32 HESS |
457 | 33 { |
34 public: | |
35 | |
1881 | 36 HESS (void) : hess_mat (), unitary_hess_mat () { } |
457 | 37 |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
38 HESS (const Matrix& a) : hess_mat (), unitary_hess_mat () { init (a); } |
1528 | 39 |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
40 HESS (const Matrix& a, octave_idx_type& info) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
41 : hess_mat (), unitary_hess_mat () |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
42 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
43 info = init (a); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
44 } |
1528 | 45 |
46 HESS (const HESS& a) | |
1881 | 47 : hess_mat (a.hess_mat), unitary_hess_mat (a.unitary_hess_mat) { } |
457 | 48 |
1528 | 49 HESS& operator = (const HESS& a) |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
50 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
51 if (this != &a) |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
52 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
53 hess_mat = a.hess_mat; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
54 unitary_hess_mat = a.unitary_hess_mat; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
55 } |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
56 return *this; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
57 } |
1528 | 58 |
1932 | 59 ~HESS (void) { } |
60 | |
1528 | 61 Matrix hess_matrix (void) const { return hess_mat; } |
62 | |
63 Matrix unitary_hess_matrix (void) const { return unitary_hess_mat; } | |
64 | |
3504 | 65 friend std::ostream& operator << (std::ostream& os, const HESS& a); |
457 | 66 |
67 private: | |
68 | |
69 Matrix hess_mat; | |
70 Matrix unitary_hess_mat; | |
1881 | 71 |
5275 | 72 octave_idx_type init (const Matrix& a); |
457 | 73 }; |
74 | |
75 #endif |