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 |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_DET_h) |
|
25 #define octave_DET_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
457
|
30 |
1296
|
31 class ostream; |
457
|
32 |
|
33 class DET |
|
34 { |
532
|
35 friend class Matrix; |
|
36 |
457
|
37 public: |
|
38 |
|
39 DET (void); |
|
40 |
|
41 DET (const DET& a); |
|
42 |
|
43 DET& operator = (const DET& a); |
|
44 |
|
45 int value_will_overflow (void) const; |
|
46 int value_will_underflow (void) const; |
|
47 double coefficient (void) const; |
|
48 int exponent (void) const; |
|
49 double value (void) const; |
|
50 |
|
51 friend ostream& operator << (ostream& os, const DET& a); |
|
52 |
|
53 private: |
|
54 |
|
55 DET (const double *d); |
|
56 |
|
57 double det [2]; |
|
58 }; |
|
59 |
|
60 inline DET::DET (void) |
|
61 { |
|
62 } |
|
63 |
|
64 inline DET::DET (const DET& a) |
|
65 { |
|
66 det[0] = a.det[0]; |
|
67 det[1] = a.det[1]; |
|
68 } |
|
69 |
|
70 inline DET& DET::operator = (const DET& a) |
|
71 { |
|
72 det[0] = a.det[0]; |
|
73 det[1] = a.det[1]; |
|
74 return *this; |
|
75 } |
|
76 |
|
77 inline DET::DET (const double *d) |
|
78 { |
|
79 det[0] = d[0]; |
|
80 det[1] = d[1]; |
|
81 } |
|
82 |
|
83 #endif |
|
84 |
|
85 /* |
|
86 ;;; Local Variables: *** |
|
87 ;;; mode: C++ *** |
|
88 ;;; page-delimiter: "^/\\*" *** |
|
89 ;;; End: *** |
|
90 */ |