annotate liboctave/boolMatrix.h @ 10521:4d1fc073fbb7

add some missing copyright stmts
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 14 Apr 2010 12:23:13 +0200
parents 96ed7c629bbd
children fd0a3ac60b0e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
1 /*
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
2
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8774
diff changeset
3 Copyright (C) 1996, 1997, 1998, 2000, 2002, 2004, 2005, 2006, 2007,
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8774
diff changeset
4 2008, 2009 John W. Eaton
10521
4d1fc073fbb7 add some missing copyright stmts
Jaroslav Hajek <highegg@gmail.com>
parents: 10364
diff changeset
5 Copyright (C) 2010 VZLU Prague
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
6
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
7 This file is part of Octave.
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
8
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
9 Octave is free software; you can redistribute it and/or modify it
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
10 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6979
diff changeset
11 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6979
diff changeset
12 option) any later version.
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
13
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
14 Octave is distributed in the hope that it will be useful, but WITHOUT
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
17 for more details.
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
18
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6979
diff changeset
20 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6979
diff changeset
21 <http://www.gnu.org/licenses/>.
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
22
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
23 */
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
24
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
25 #if !defined (octave_boolMatrix_int_h)
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
26 #define octave_boolMatrix_int_h 1
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
27
10351
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
28 #include "Array.h"
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
29
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
30 #include "mx-defs.h"
8774
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents: 7620
diff changeset
31 #include "mx-op-decl.h"
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
32
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
33 class
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5307
diff changeset
34 OCTAVE_API
10351
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
35 boolMatrix : public Array<bool>
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
36 {
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
37 public:
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
38
10351
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
39 boolMatrix (void) : Array<bool> () { }
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
40 boolMatrix (octave_idx_type r, octave_idx_type c) : Array<bool> (r, c) { }
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
41 boolMatrix (octave_idx_type r, octave_idx_type c, bool val) : Array<bool> (r, c, val) { }
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
42 boolMatrix (const dim_vector& dv) : Array<bool> (dv) { }
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
43 boolMatrix (const dim_vector& dv, bool val) : Array<bool> (dv, val) { }
10352
a3635bc1ea19 remove Array2
Jaroslav Hajek <highegg@gmail.com>
parents: 10351
diff changeset
44 boolMatrix (const Array<bool>& a) : Array<bool> (a.as_matrix ()) { }
10351
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
45 boolMatrix (const boolMatrix& a) : Array<bool> (a) { }
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
46
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
47 boolMatrix& operator = (const boolMatrix& a)
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
48 {
10351
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
49 Array<bool>::operator = (a);
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
50 return *this;
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
51 }
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
52
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
53 bool operator == (const boolMatrix& a) const;
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
54 bool operator != (const boolMatrix& a) const;
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
55
10351
5150ceb4dbb4 base charMatrix and boolMatrix on Array<char>
Jaroslav Hajek <highegg@gmail.com>
parents: 10158
diff changeset
56 boolMatrix transpose (void) const { return Array<bool>::transpose (); }
3225
7aae2c3636a7 [project @ 1998-12-04 23:20:12 by jwe]
jwe
parents: 3203
diff changeset
57
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
58 // destructive insert/delete/reorder operations
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
59
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
60 boolMatrix& insert (const boolMatrix& a, octave_idx_type r, octave_idx_type c);
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
61
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 2847
diff changeset
62 // unary operations
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 2847
diff changeset
63
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 2847
diff changeset
64 boolMatrix operator ! (void) const;
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 2847
diff changeset
65
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 2847
diff changeset
66 // other operations
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 2847
diff changeset
67
7620
36594d5bbe13 Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
68 boolMatrix diag (octave_idx_type k = 0) const;
6979
2883ea1c5c18 [project @ 2007-10-08 20:23:48 by dbateman]
dbateman
parents: 6708
diff changeset
69
4017
0eb247b9cc9b [project @ 2002-08-03 04:07:14 by jwe]
jwe
parents: 4015
diff changeset
70 boolMatrix all (int dim = -1) const;
0eb247b9cc9b [project @ 2002-08-03 04:07:14 by jwe]
jwe
parents: 4015
diff changeset
71 boolMatrix any (int dim = -1) const;
2832
4dff308e9acc [project @ 1997-03-26 05:16:58 by jwe]
jwe
parents: 2828
diff changeset
72
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
73 #if 0
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
74 // i/o
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
75
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 3225
diff changeset
76 friend std::ostream& operator << (std::ostream& os, const Matrix& a);
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 3225
diff changeset
77 friend std::istream& operator >> (std::istream& is, Matrix& a);
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
78 #endif
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
79
3933
f9ea3dcf58ee [project @ 2002-05-15 03:21:00 by jwe]
jwe
parents: 3685
diff changeset
80 static bool resize_fill_value (void) { return false; }
f9ea3dcf58ee [project @ 2002-05-15 03:21:00 by jwe]
jwe
parents: 3685
diff changeset
81
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
82 };
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
83
9550
3d6a9aea2aea refactor binary & bool ops in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
84 MM_BOOL_OP_DECLS (boolMatrix, boolMatrix, OCTAVE_API)
3d6a9aea2aea refactor binary & bool ops in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
85 MS_BOOL_OP_DECLS (boolMatrix, bool, OCTAVE_API)
3d6a9aea2aea refactor binary & bool ops in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
86 SM_BOOL_OP_DECLS (bool, boolMatrix, OCTAVE_API)
6708
0ce71beb1cf3 [project @ 2007-06-13 06:40:48 by jwe]
jwe
parents: 6108
diff changeset
87 MM_CMP_OP_DECLS (boolMatrix, boolMatrix, OCTAVE_API)
3685
9d8306640373 [project @ 2000-06-28 19:25:02 by jwe]
jwe
parents: 3504
diff changeset
88
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents:
diff changeset
89 #endif