2828
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
2828
|
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 |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
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 |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_boolMatrix_int_h) |
|
24 #define octave_boolMatrix_int_h 1 |
|
25 |
|
26 #if defined (__GNUG__) |
|
27 #pragma interface |
|
28 #endif |
|
29 |
2844
|
30 #include "Array2.h" |
2828
|
31 |
|
32 #include "mx-defs.h" |
|
33 |
|
34 class |
2844
|
35 boolMatrix : public Array2<bool> |
2828
|
36 { |
|
37 public: |
|
38 |
2844
|
39 boolMatrix (void) : Array2<bool> () { } |
|
40 boolMatrix (int r, int c) : Array2<bool> (r, c) { } |
|
41 boolMatrix (int r, int c, bool val) : Array2<bool> (r, c, val) { } |
|
42 boolMatrix (const Array2<bool>& a) : Array2<bool> (a) { } |
|
43 boolMatrix (const boolMatrix& a) : Array2<bool> (a) { } |
2828
|
44 |
|
45 boolMatrix& operator = (const boolMatrix& a) |
|
46 { |
2844
|
47 Array2<bool>::operator = (a); |
2828
|
48 return *this; |
|
49 } |
|
50 |
|
51 bool operator == (const boolMatrix& a) const; |
|
52 bool operator != (const boolMatrix& a) const; |
|
53 |
|
54 // destructive insert/delete/reorder operations |
|
55 |
|
56 boolMatrix& insert (const boolMatrix& a, int r, int c); |
|
57 |
|
58 boolMatrix transpose (void) const; |
|
59 |
3203
|
60 // unary operations |
|
61 |
|
62 boolMatrix operator ! (void) const; |
|
63 |
|
64 // other operations |
|
65 |
2832
|
66 boolMatrix all (void) const; |
|
67 boolMatrix any (void) const; |
|
68 |
2828
|
69 #if 0 |
|
70 // i/o |
|
71 |
|
72 friend ostream& operator << (ostream& os, const Matrix& a); |
|
73 friend istream& operator >> (istream& is, Matrix& a); |
|
74 #endif |
|
75 |
|
76 private: |
|
77 |
2844
|
78 boolMatrix (bool *b, int r, int c) : Array2<bool> (b, r, c) { } |
2828
|
79 }; |
|
80 |
|
81 #endif |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; End: *** |
|
87 */ |