2828
|
1 /* |
|
2 |
|
3 Copyright (C) 1996 John W. Eaton |
|
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 |
|
30 #include "MArray2.h" |
|
31 |
|
32 #include "mx-defs.h" |
|
33 |
|
34 class |
|
35 boolMatrix : public MArray2<bool> |
|
36 { |
|
37 public: |
|
38 |
|
39 boolMatrix (void) : MArray2<bool> () { } |
|
40 boolMatrix (int r, int c) : MArray2<bool> (r, c) { } |
|
41 boolMatrix (int r, int c, bool val) : MArray2<bool> (r, c, val) { } |
|
42 boolMatrix (const MArray2<bool>& a) : MArray2<bool> (a) { } |
|
43 boolMatrix (const boolMatrix& a) : MArray2<bool> (a) { } |
|
44 |
|
45 boolMatrix& operator = (const boolMatrix& a) |
|
46 { |
|
47 MArray2<bool>::operator = (a); |
|
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 |
2832
|
60 boolMatrix all (void) const; |
|
61 boolMatrix any (void) const; |
|
62 |
2828
|
63 #if 0 |
|
64 // i/o |
|
65 |
|
66 friend ostream& operator << (ostream& os, const Matrix& a); |
|
67 friend istream& operator >> (istream& is, Matrix& a); |
|
68 #endif |
|
69 |
|
70 private: |
|
71 |
|
72 boolMatrix (bool *b, int r, int c) : MArray2<bool> (b, r, c) { } |
|
73 }; |
|
74 |
|
75 #endif |
|
76 |
|
77 /* |
|
78 ;;; Local Variables: *** |
|
79 ;;; mode: C++ *** |
|
80 ;;; End: *** |
|
81 */ |