3207
|
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) |
3207
|
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" |
3207
|
33 #include "ov.h" |
|
34 #include "ov-range.h" |
|
35 #include "ov-typeinfo.h" |
|
36 #include "ops.h" |
|
37 |
|
38 // range unary ops. |
|
39 |
|
40 DEFUNOP (not, range) |
|
41 { |
|
42 CAST_UNOP_ARG (const octave_range&); |
|
43 |
|
44 return octave_value (! v.matrix_value()); |
|
45 } |
|
46 |
|
47 DEFUNOP_OP (uminus, range, -) |
|
48 |
|
49 DEFUNOP (transpose, range) |
|
50 { |
|
51 CAST_UNOP_ARG (const octave_range&); |
|
52 |
|
53 return octave_value (v.matrix_value().transpose ()); |
|
54 } |
|
55 |
|
56 void |
|
57 install_range_ops (void) |
|
58 { |
3538
|
59 INSTALL_UNOP (op_not, octave_range, not); |
|
60 INSTALL_UNOP (op_uminus, octave_range, uminus); |
|
61 INSTALL_UNOP (op_transpose, octave_range, transpose); |
|
62 INSTALL_UNOP (op_hermitian, octave_range, transpose); |
3207
|
63 } |
|
64 |
|
65 /* |
|
66 ;;; Local Variables: *** |
|
67 ;;; mode: C++ *** |
|
68 ;;; End: *** |
|
69 */ |