comparison src/OPERATORS/op-ui64-ui64.cc @ 4905:f7a337f3fd9e

[project @ 2004-06-17 04:11:50 by jwe]
author jwe
date Thu, 17 Jun 2004 04:14:36 +0000
parents 35bfb4e0b96b
children 7a3a480e8645
comparison
equal deleted inserted replaced
4904:71229573b6bf 4905:f7a337f3fd9e
35 #include "ov-typeinfo.h" 35 #include "ov-typeinfo.h"
36 #include "ops.h" 36 #include "ops.h"
37 #include "xdiv.h" 37 #include "xdiv.h"
38 #include "xpow.h" 38 #include "xpow.h"
39 39
40 // matrix unary ops. 40 #include "op-int.h"
41 41
42 DEFNDUNOP_OP (not, uint64_matrix, uint64_array, !) 42 OCTAVE_S_INT_UNOPS (uint64)
43 DEFNDUNOP_OP (uminus, uint64_matrix, uint64_array, -) 43 OCTAVE_SS_INT_CMP_OPS (uint64, uint64)
44 OCTAVE_SS_INT_BOOL_OPS (uint64, uint64)
44 45
45 DEFUNOP (transpose, uint64_matrix) 46 OCTAVE_SM_INT_CMP_OPS (uint64, uint64)
46 { 47 OCTAVE_SM_INT_BOOL_OPS (uint64, uint64)
47 CAST_UNOP_ARG (const octave_uint64_matrix&);
48 48
49 if (v.ndims () > 2) 49 OCTAVE_MS_INT_CMP_OPS (uint64, uint64)
50 { 50 OCTAVE_MS_INT_BOOL_OPS (uint64, uint64)
51 error ("transpose not defined for N-d objects");
52 return octave_value ();
53 }
54 else
55 return octave_value (v.uint64_array_value().transpose ());
56 }
57 51
58 //DEFNCUNOP_METHOD (incr, uint64_matrix, increment) 52 OCTAVE_M_INT_UNOPS (uint64)
59 //DEFNCUNOP_METHOD (decr, uint64_matrix, decrement) 53 OCTAVE_MM_INT_CMP_OPS (uint64, uint64)
60 54 OCTAVE_MM_INT_BOOL_OPS (uint64, uint64)
61 // matrix by matrix ops. 55 OCTAVE_MM_INT_ASSIGN_OPS (uint64)
62
63 //DEFNDBINOP_OP (add, uint64_matrix, uint64_matrix, uint64_array, uint64_array, +)
64 //DEFNDBINOP_OP (sub, uint64_matrix, uint64_matrix, uint64_array, uint64_array, -)
65
66 //DEFBINOP_OP (mul, uint64_matrix, uint64_matrix, *)
67 //DEFBINOP_FN (div, uint64_matrix, uint64_matrix, xdiv)
68
69 DEFBINOPX (pow, uint64_matrix, uint64_matrix)
70 {
71 error ("can't do A ^ B for A and B both matrices");
72 return octave_value ();
73 }
74
75 //DEFBINOP_FN (ldiv, uint64_matrix, uint64_matrix, xleftdiv)
76
77 DEFNDBINOP_FN (lt, uint64_matrix, uint64_matrix, uint64_array, uint64_array, mx_el_lt)
78 DEFNDBINOP_FN (le, uint64_matrix, uint64_matrix, uint64_array, uint64_array, mx_el_le)
79 DEFNDBINOP_FN (eq, uint64_matrix, uint64_matrix, uint64_array, uint64_array, mx_el_eq)
80 DEFNDBINOP_FN (ge, uint64_matrix, uint64_matrix, uint64_array, uint64_array, mx_el_ge)
81 DEFNDBINOP_FN (gt, uint64_matrix, uint64_matrix, uint64_array, uint64_array, mx_el_gt)
82 DEFNDBINOP_FN (ne, uint64_matrix, uint64_matrix, uint64_array, uint64_array, mx_el_ne)
83
84 //DEFNDBINOP_FN (el_mul, uint64_matrix, uint64_matrix, uint64_array, uint64_array, product)
85
86 //DEFNDBINOP_FN (el_div, uint64_matrix, uint64_matrix, uint64_array, uint64_array, quotient)
87
88 //DEFNDBINOP_FN (el_pow, uint64_matrix, uint64_matrix, uint64_array, uint64_array, elem_xpow)
89
90 //DEFBINOP (el_ldiv, uint64_matrix, uint64_matrix)
91 //{
92 // CAST_BINOP_ARGS (const octave_matrix&, const octave_matrix&);
93 //
94 // return octave_value (quotient (v2.array_value (), v1.array_value ()));
95 //}
96
97 DEFNDBINOP_FN (el_and, uint64_matrix, uint64_matrix, uint64_array, uint64_array, mx_el_and)
98 DEFNDBINOP_FN (el_or, uint64_matrix, uint64_matrix, uint64_array, uint64_array, mx_el_or)
99
100 DEFNDASSIGNOP_FN (assign, uint64_matrix, uint64_matrix, uint64_array, assign)
101 56
102 void 57 void
103 install_ui64_ui64_ops (void) 58 install_ui64_ui64_ops (void)
104 { 59 {
105 INSTALL_UNOP (op_not, octave_uint64_matrix, not); 60 OCTAVE_INSTALL_S_INT_UNOPS (uint64);
106 INSTALL_UNOP (op_uminus, octave_uint64_matrix, uminus); 61 OCTAVE_INSTALL_SS_INT_CMP_OPS (uint64, uint64);
107 INSTALL_UNOP (op_transpose, octave_uint64_matrix, transpose); 62 OCTAVE_INSTALL_SS_INT_BOOL_OPS (uint64, uint64);
108 INSTALL_UNOP (op_hermitian, octave_uint64_matrix, transpose);
109 63
110 // INSTALL_NCUNOP (op_incr, octave_uint64_matrix, incr); 64 OCTAVE_INSTALL_SM_INT_CMP_OPS (uint64, uint64);
111 // INSTALL_NCUNOP (op_decr, octave_uint64_matrix, decr); 65 OCTAVE_INSTALL_SM_INT_BOOL_OPS (uint64, uint64);
112 66
113 // INSTALL_BINOP (op_add, octave_uint64_matrix, octave_uint64_matrix, add); 67 OCTAVE_INSTALL_MS_INT_CMP_OPS (uint64, uint64);
114 // INSTALL_BINOP (op_sub, octave_uint64_matrix, octave_uint64_matrix, sub); 68 OCTAVE_INSTALL_MS_INT_BOOL_OPS (uint64, uint64);
115 // INSTALL_BINOP (op_mul, octave_uint64_matrix, octave_uint64_matrix, mul);
116 // INSTALL_BINOP (op_div, octave_uint64_matrix, octave_uint64_matrix, div);
117 // INSTALL_BINOP (op_pow, octave_uint64_matrix, octave_uint64_matrix, pow);
118 // INSTALL_BINOP (op_ldiv, octave_uint64_matrix, octave_uint64_matrix, ldiv);
119 INSTALL_BINOP (op_lt, octave_uint64_matrix, octave_uint64_matrix, lt);
120 INSTALL_BINOP (op_le, octave_uint64_matrix, octave_uint64_matrix, le);
121 INSTALL_BINOP (op_eq, octave_uint64_matrix, octave_uint64_matrix, eq);
122 INSTALL_BINOP (op_ge, octave_uint64_matrix, octave_uint64_matrix, ge);
123 INSTALL_BINOP (op_gt, octave_uint64_matrix, octave_uint64_matrix, gt);
124 INSTALL_BINOP (op_ne, octave_uint64_matrix, octave_uint64_matrix, ne);
125 // INSTALL_BINOP (op_el_mul, octave_uint64_matrix, octave_uint64_matrix, el_mul);
126 // INSTALL_BINOP (op_el_div, octave_uint64_matrix, octave_uint64_matrix, el_div);
127 // INSTALL_BINOP (op_el_pow, octave_uint64_matrix, octave_uint64_matrix, el_pow);
128 // INSTALL_BINOP (op_el_ldiv, octave_uint64_matrix, octave_uint64_matrix, el_ldiv);
129 INSTALL_BINOP (op_el_and, octave_uint64_matrix, octave_uint64_matrix, el_and);
130 INSTALL_BINOP (op_el_or, octave_uint64_matrix, octave_uint64_matrix, el_or);
131 69
132 INSTALL_ASSIGNOP (op_asn_eq, octave_uint64_matrix, octave_uint64_matrix, assign); 70 OCTAVE_INSTALL_M_INT_UNOPS (uint64);
71 OCTAVE_INSTALL_MM_INT_CMP_OPS (uint64, uint64);
72 OCTAVE_INSTALL_MM_INT_BOOL_OPS (uint64, uint64);
73 OCTAVE_INSTALL_MM_INT_ASSIGN_OPS (uint64);
133 } 74 }
134 75
135 /* 76 /*
136 ;;; Local Variables: *** 77 ;;; Local Variables: ***
137 ;;; mode: C++ *** 78 ;;; mode: C++ ***