3937
|
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) |
3937
|
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" |
3937
|
33 #include "ov.h" |
|
34 #include "ov-cell.h" |
|
35 #include "ov-scalar.h" |
|
36 #include "ov-re-mat.h" |
|
37 #include "ov-typeinfo.h" |
|
38 #include "ops.h" |
|
39 |
|
40 // cell ops. |
|
41 |
4673
|
42 DEFUNOP (transpose, cell) |
|
43 { |
|
44 CAST_UNOP_ARG (const octave_cell&); |
|
45 |
|
46 if (v.ndims () > 2) |
|
47 { |
|
48 error ("transpose not defined for N-d objects"); |
|
49 return octave_value (); |
|
50 } |
|
51 else |
|
52 return octave_value (Cell (v.cell_value().transpose ())); |
|
53 } |
|
54 |
3937
|
55 DEFASSIGNANYOP_FN (assign, cell, assign); |
|
56 |
|
57 void |
|
58 install_cell_ops (void) |
|
59 { |
4673
|
60 INSTALL_UNOP (op_transpose, octave_cell, transpose); |
|
61 INSTALL_UNOP (op_hermitian, octave_cell, transpose); |
|
62 |
3937
|
63 INSTALL_ASSIGNANYOP (op_asn_eq, octave_cell, assign); |
|
64 } |
|
65 |
|
66 /* |
|
67 ;;; Local Variables: *** |
|
68 ;;; mode: C++ *** |
|
69 ;;; End: *** |
|
70 */ |