2928
|
1 /* |
|
2 |
|
3 Copyright (C) 1996, 1997 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 |
4192
|
23 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION) |
2928
|
24 #pragma implementation |
|
25 #endif |
|
26 |
|
27 #ifdef HAVE_CONFIG_H |
|
28 #include <config.h> |
|
29 #endif |
|
30 |
|
31 #include "gripes.h" |
4055
|
32 #include "oct-obj.h" |
2928
|
33 #include "ov.h" |
|
34 #include "ov-bool-mat.h" |
|
35 #include "ov-typeinfo.h" |
|
36 #include "ops.h" |
|
37 #include "xdiv.h" |
|
38 #include "xpow.h" |
|
39 |
3203
|
40 // unary bool matrix ops. |
|
41 |
4543
|
42 DEFNDUNOP_OP (not, bool_matrix, !) |
3203
|
43 |
|
44 DEFUNOP (transpose, bool_matrix) |
|
45 { |
|
46 CAST_UNOP_ARG (const octave_bool_matrix&); |
|
47 |
|
48 return octave_value (v.bool_matrix_value().transpose ()); |
|
49 } |
|
50 |
2928
|
51 // bool matrix by bool matrix ops. |
|
52 |
4543
|
53 DEFNDBINOP_FN (eq, bool_matrix, bool_matrix, array, array, mx_el_eq) |
|
54 DEFNDBINOP_FN (ne, bool_matrix, bool_matrix, array, array, mx_el_ne) |
2928
|
55 |
|
56 void |
|
57 install_bm_bm_ops (void) |
|
58 { |
3538
|
59 INSTALL_UNOP (op_not, octave_bool_matrix, not); |
|
60 INSTALL_UNOP (op_transpose, octave_bool_matrix, transpose); |
|
61 INSTALL_UNOP (op_hermitian, octave_bool_matrix, transpose); |
3203
|
62 |
3538
|
63 INSTALL_BINOP (op_eq, octave_bool_matrix, octave_bool_matrix, eq); |
|
64 INSTALL_BINOP (op_ne, octave_bool_matrix, octave_bool_matrix, ne); |
2928
|
65 } |
|
66 |
|
67 /* |
|
68 ;;; Local Variables: *** |
|
69 ;;; mode: C++ *** |
|
70 ;;; End: *** |
|
71 */ |