Mercurial > hg > octave-nkf
annotate liboctave/boolMatrix.h @ 7904:1fddd9b8e862
Fix nil_rep reference counting in gl-render.cc::vertex_data internal class
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 09 Jul 2008 10:59:29 -0400 |
parents | 36594d5bbe13 |
children | b756ce0002db |
rev | line source |
---|---|
2828 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1996, 1997, 1998, 2000, 2002, 2004, 2005, 2006, 2007 |
4 John W. Eaton | |
2828 | 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 | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
2828 | 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 | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
2828 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_boolMatrix_int_h) | |
25 #define octave_boolMatrix_int_h 1 | |
26 | |
2844 | 27 #include "Array2.h" |
2828 | 28 |
29 #include "mx-defs.h" | |
3685 | 30 #include "mx-op-defs.h" |
2828 | 31 |
32 class | |
6108 | 33 OCTAVE_API |
2844 | 34 boolMatrix : public Array2<bool> |
2828 | 35 { |
36 public: | |
37 | |
2844 | 38 boolMatrix (void) : Array2<bool> () { } |
5275 | 39 boolMatrix (octave_idx_type r, octave_idx_type c) : Array2<bool> (r, c) { } |
40 boolMatrix (octave_idx_type r, octave_idx_type c, bool val) : Array2<bool> (r, c, val) { } | |
6979 | 41 boolMatrix (const dim_vector& dv) : Array2<bool> (dv) { } |
42 boolMatrix (const dim_vector& dv, bool val) : Array2<bool> (dv, val) { } | |
2844 | 43 boolMatrix (const Array2<bool>& a) : Array2<bool> (a) { } |
44 boolMatrix (const boolMatrix& a) : Array2<bool> (a) { } | |
2828 | 45 |
46 boolMatrix& operator = (const boolMatrix& a) | |
47 { | |
2844 | 48 Array2<bool>::operator = (a); |
2828 | 49 return *this; |
50 } | |
51 | |
52 bool operator == (const boolMatrix& a) const; | |
53 bool operator != (const boolMatrix& a) const; | |
54 | |
3225 | 55 boolMatrix transpose (void) const { return Array2<bool>::transpose (); } |
56 | |
2828 | 57 // destructive insert/delete/reorder operations |
58 | |
5275 | 59 boolMatrix& insert (const boolMatrix& a, octave_idx_type r, octave_idx_type c); |
2828 | 60 |
3203 | 61 // unary operations |
62 | |
63 boolMatrix operator ! (void) const; | |
64 | |
65 // other operations | |
66 | |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
67 boolMatrix diag (octave_idx_type k = 0) const; |
6979 | 68 |
4017 | 69 boolMatrix all (int dim = -1) const; |
70 boolMatrix any (int dim = -1) const; | |
2832 | 71 |
2828 | 72 #if 0 |
73 // i/o | |
74 | |
3504 | 75 friend std::ostream& operator << (std::ostream& os, const Matrix& a); |
76 friend std::istream& operator >> (std::istream& is, Matrix& a); | |
2828 | 77 #endif |
78 | |
3933 | 79 static bool resize_fill_value (void) { return false; } |
80 | |
2828 | 81 private: |
82 | |
5275 | 83 boolMatrix (bool *b, octave_idx_type r, octave_idx_type c) : Array2<bool> (b, r, c) { } |
2828 | 84 }; |
85 | |
6708 | 86 MM_CMP_OP_DECLS (boolMatrix, boolMatrix, OCTAVE_API) |
3685 | 87 |
2828 | 88 #endif |
89 | |
90 /* | |
91 ;;; Local Variables: *** | |
92 ;;; mode: C++ *** | |
93 ;;; End: *** | |
94 */ |