457
|
1 // -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993, 1994 John W. Eaton |
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_CHOL_h) |
|
25 #define octave_CHOL_h 1 |
|
26 |
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
|
31 class ostream; |
|
32 |
|
33 #include "dMatrix.h" |
|
34 |
|
35 extern "C++" { |
|
36 |
|
37 class CHOL |
|
38 { |
|
39 friend class Matrix; |
|
40 |
|
41 public: |
|
42 |
|
43 CHOL (void) {} |
|
44 |
|
45 CHOL (const Matrix& a); |
|
46 CHOL (const Matrix& a, int& info); |
|
47 |
|
48 CHOL (const CHOL& a); |
|
49 |
|
50 CHOL& operator = (const CHOL& a); |
|
51 Matrix chol_matrix (void) const; |
|
52 friend ostream& operator << (ostream& os, const CHOL& a); |
|
53 |
|
54 private: |
|
55 |
|
56 int init (const Matrix& a); |
|
57 |
|
58 Matrix chol_mat; |
|
59 }; |
|
60 |
|
61 inline CHOL::CHOL (const Matrix& a) |
|
62 { |
|
63 init (a); |
|
64 } |
|
65 |
|
66 inline CHOL::CHOL (const Matrix& a, int& info) |
|
67 { |
|
68 info = init (a); |
|
69 } |
|
70 |
|
71 inline CHOL::CHOL (const CHOL& a) |
|
72 { |
|
73 chol_mat = a.chol_mat; |
|
74 } |
|
75 |
|
76 inline CHOL& |
|
77 CHOL::operator = (const CHOL& a) |
|
78 { |
|
79 chol_mat = a.chol_mat; |
|
80 |
|
81 return *this; |
|
82 } |
|
83 |
|
84 inline Matrix CHOL::chol_matrix (void) const |
|
85 { |
|
86 return chol_mat; |
|
87 } |
|
88 |
|
89 } // extern "C++" |
|
90 |
|
91 #endif |
|
92 |
|
93 /* |
|
94 ;;; Local Variables: *** |
|
95 ;;; mode: C++ *** |
|
96 ;;; page-delimiter: "^/\\*" *** |
|
97 ;;; End: *** |
|
98 */ |