457
|
1 // -*- C++ -*- |
|
2 /* |
|
3 |
1011
|
4 Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton |
457
|
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 |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
457
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_CHOL_h) |
|
25 #define octave_CHOL_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
457
|
31 class ostream; |
|
32 |
|
33 #include "dMatrix.h" |
|
34 |
|
35 class CHOL |
|
36 { |
|
37 friend class Matrix; |
|
38 |
|
39 public: |
|
40 |
|
41 CHOL (void) {} |
|
42 |
|
43 CHOL (const Matrix& a); |
|
44 CHOL (const Matrix& a, int& info); |
|
45 |
|
46 CHOL (const CHOL& a); |
|
47 |
|
48 CHOL& operator = (const CHOL& a); |
|
49 Matrix chol_matrix (void) const; |
|
50 friend ostream& operator << (ostream& os, const CHOL& a); |
|
51 |
|
52 private: |
|
53 |
|
54 int init (const Matrix& a); |
|
55 |
|
56 Matrix chol_mat; |
|
57 }; |
|
58 |
|
59 inline CHOL::CHOL (const Matrix& a) |
|
60 { |
|
61 init (a); |
|
62 } |
|
63 |
|
64 inline CHOL::CHOL (const Matrix& a, int& info) |
|
65 { |
|
66 info = init (a); |
|
67 } |
|
68 |
|
69 inline CHOL::CHOL (const CHOL& a) |
|
70 { |
|
71 chol_mat = a.chol_mat; |
|
72 } |
|
73 |
|
74 inline CHOL& |
|
75 CHOL::operator = (const CHOL& a) |
|
76 { |
|
77 chol_mat = a.chol_mat; |
|
78 |
|
79 return *this; |
|
80 } |
|
81 |
|
82 inline Matrix CHOL::chol_matrix (void) const |
|
83 { |
|
84 return chol_mat; |
|
85 } |
|
86 |
|
87 #endif |
|
88 |
|
89 /* |
|
90 ;;; Local Variables: *** |
|
91 ;;; mode: C++ *** |
|
92 ;;; page-delimiter: "^/\\*" *** |
|
93 ;;; End: *** |
|
94 */ |