annotate liboctave/mx-op-decl.h @ 8982:dc6bda6f9994

implement compound logical ops
author Jaroslav Hajek <highegg@gmail.com>
date Sat, 14 Mar 2009 23:08:08 +0100
parents b756ce0002db
children 11844593875a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8774
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
1 /*
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
2
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
3 Copyright (C) 1996, 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006,
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
4 2007 John W. Eaton
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
5 Copyright (C) 2008, 2009 Jaroslav Hajek
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
6
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
7 This file is part of Octave.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
8
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
9 Octave is free software; you can redistribute it and/or modify it
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
10 under the terms of the GNU General Public License as published by the
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
11 Free Software Foundation; either version 3 of the License, or (at your
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
12 option) any later version.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
13
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
14 Octave is distributed in the hope that it will be useful, but WITHOUT
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
17 for more details.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
18
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
20 along with Octave; see the file COPYING. If not, see
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
21 <http://www.gnu.org/licenses/>.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
22
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
23 */
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
24
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
25 #if !defined (octave_mx_op_decl_h)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
26 #define octave_mx_op_decl_h 1
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
27
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
28 #include "oct-types.h"
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
29
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
30 #define BIN_OP_DECL(R, OP, X, Y, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
31 extern API R OP (const X&, const Y&)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
32
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
33 class boolMatrix;
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
34 class boolNDArray;
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
35
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
36 #define CMP_OP_DECL(OP, X, Y, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
37 extern API boolMatrix OP (const X&, const Y&)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
38
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
39 #define NDCMP_OP_DECL(OP, X, Y, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
40 extern API boolNDArray OP (const X&, const Y&)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
41
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
42 #define BOOL_OP_DECL(OP, X, Y, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
43 extern API boolMatrix OP (const X&, const Y&)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
44
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
45 #define NDBOOL_OP_DECL(OP, X, Y, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
46 extern API boolNDArray OP (const X&, const Y&)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
47
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
48 // vector by scalar operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
49
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
50 #define VS_BIN_OP_DECLS(R, V, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
51 BIN_OP_DECL (R, operator +, V, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
52 BIN_OP_DECL (R, operator -, V, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
53 BIN_OP_DECL (R, operator *, V, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
54 BIN_OP_DECL (R, operator /, V, S, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
55
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
56 #define VS_OP_DECLS(R, V, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
57 VS_BIN_OP_DECLS(R, V, S, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
58
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
59 // scalar by vector by operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
60
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
61 #define SV_BIN_OP_DECLS(R, S, V, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
62 BIN_OP_DECL (R, operator +, S, V, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
63 BIN_OP_DECL (R, operator -, S, V, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
64 BIN_OP_DECL (R, operator *, S, V, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
65 BIN_OP_DECL (R, operator /, S, V, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
66
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
67 #define SV_OP_DECLS(R, S, V, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
68 SV_BIN_OP_DECLS(R, S, V, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
69
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
70 // vector by vector operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
71
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
72 #define VV_BIN_OP_DECLS(R, V1, V2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
73 BIN_OP_DECL (R, operator +, V1, V2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
74 BIN_OP_DECL (R, operator -, V1, V2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
75 BIN_OP_DECL (R, product, V1, V2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
76 BIN_OP_DECL (R, quotient, V1, V2, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
77
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
78 #define VV_OP_DECLS(R, V1, V2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
79 VV_BIN_OP_DECLS(R, V1, V2, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
80
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
81 // matrix by scalar operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
82
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
83 #define MS_BIN_OP_DECLS(R, M, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
84 BIN_OP_DECL (R, operator +, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
85 BIN_OP_DECL (R, operator -, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
86 BIN_OP_DECL (R, operator *, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
87 BIN_OP_DECL (R, operator /, M, S, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
88
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
89 #define MS_CMP_OP_DECLS(M, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
90 CMP_OP_DECL (mx_el_lt, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
91 CMP_OP_DECL (mx_el_le, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
92 CMP_OP_DECL (mx_el_ge, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
93 CMP_OP_DECL (mx_el_gt, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
94 CMP_OP_DECL (mx_el_eq, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
95 CMP_OP_DECL (mx_el_ne, M, S, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
96
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
97 #define MS_BOOL_OP_DECLS(M, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
98 BOOL_OP_DECL (mx_el_and, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
99 BOOL_OP_DECL (mx_el_or, M, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
100
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
101 #define MS_OP_DECLS(R, M, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
102 MS_BIN_OP_DECLS (R, M, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
103 MS_CMP_OP_DECLS (M, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
104 MS_BOOL_OP_DECLS (M, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
105
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
106 // scalar by matrix operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
107
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
108 #define SM_BIN_OP_DECLS(R, S, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
109 BIN_OP_DECL (R, operator +, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
110 BIN_OP_DECL (R, operator -, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
111 BIN_OP_DECL (R, operator *, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
112 BIN_OP_DECL (R, operator /, S, M, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
113
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
114 #define SM_CMP_OP_DECLS(S, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
115 CMP_OP_DECL (mx_el_lt, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
116 CMP_OP_DECL (mx_el_le, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
117 CMP_OP_DECL (mx_el_ge, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
118 CMP_OP_DECL (mx_el_gt, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
119 CMP_OP_DECL (mx_el_eq, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
120 CMP_OP_DECL (mx_el_ne, S, M, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
121
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
122 #define SM_BOOL_OP_DECLS(S, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
123 BOOL_OP_DECL (mx_el_and, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
124 BOOL_OP_DECL (mx_el_or, S, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
125
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
126 #define SM_OP_DECLS(R, S, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
127 SM_BIN_OP_DECLS (R, S, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
128 SM_CMP_OP_DECLS (S, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
129 SM_BOOL_OP_DECLS (S, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
130
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
131 // matrix by matrix operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
132
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
133 #define MM_BIN_OP_DECLS(R, M1, M2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
134 BIN_OP_DECL (R, operator +, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
135 BIN_OP_DECL (R, operator -, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
136 BIN_OP_DECL (R, product, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
137 BIN_OP_DECL (R, quotient, M1, M2, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
138
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
139 #define MM_CMP_OP_DECLS(M1, M2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
140 CMP_OP_DECL (mx_el_lt, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
141 CMP_OP_DECL (mx_el_le, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
142 CMP_OP_DECL (mx_el_ge, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
143 CMP_OP_DECL (mx_el_gt, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
144 CMP_OP_DECL (mx_el_eq, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
145 CMP_OP_DECL (mx_el_ne, M1, M2, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
146
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
147 #define MM_BOOL_OP_DECLS(M1, M2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
148 BOOL_OP_DECL (mx_el_and, M1, M2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
149 BOOL_OP_DECL (mx_el_or, M1, M2, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
150
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
151 #define MM_OP_DECLS(R, M1, M2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
152 MM_BIN_OP_DECLS (R, M1, M2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
153 MM_CMP_OP_DECLS (M1, M2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
154 MM_BOOL_OP_DECLS (M1, M2, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
155
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
156 // N-d matrix by scalar operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
157
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
158 #define NDS_BIN_OP_DECLS(R, ND, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
159 BIN_OP_DECL (R, operator +, ND, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
160 BIN_OP_DECL (R, operator -, ND, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
161 BIN_OP_DECL (R, operator *, ND, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
162 BIN_OP_DECL (R, operator /, ND, S, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
163
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
164 #define NDS_CMP_OP_DECLS(ND, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
165 NDCMP_OP_DECL (mx_el_lt, ND, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
166 NDCMP_OP_DECL (mx_el_le, ND, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
167 NDCMP_OP_DECL (mx_el_ge, ND, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
168 NDCMP_OP_DECL (mx_el_gt, ND, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
169 NDCMP_OP_DECL (mx_el_eq, ND, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
170 NDCMP_OP_DECL (mx_el_ne, ND, S, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
171
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
172 #define NDS_BOOL_OP_DECLS(ND, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
173 NDBOOL_OP_DECL (mx_el_and, ND, S, API); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
174 NDBOOL_OP_DECL (mx_el_or, ND, S, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
175 NDBOOL_OP_DECL (mx_el_not_and, ND, S, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
176 NDBOOL_OP_DECL (mx_el_not_or, ND, S, API);
8774
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
177
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
178 #define NDS_OP_DECLS(R, ND, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
179 NDS_BIN_OP_DECLS (R, ND, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
180 NDS_CMP_OP_DECLS (ND, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
181 NDS_BOOL_OP_DECLS (ND, S, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
182
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
183 // scalar by N-d matrix operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
184
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
185 #define SND_BIN_OP_DECLS(R, S, ND, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
186 BIN_OP_DECL (R, operator +, S, ND, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
187 BIN_OP_DECL (R, operator -, S, ND, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
188 BIN_OP_DECL (R, operator *, S, ND, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
189 BIN_OP_DECL (R, operator /, S, ND, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
190
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
191 #define SND_CMP_OP_DECLS(S, ND, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
192 NDCMP_OP_DECL (mx_el_lt, S, ND, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
193 NDCMP_OP_DECL (mx_el_le, S, ND, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
194 NDCMP_OP_DECL (mx_el_ge, S, ND, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
195 NDCMP_OP_DECL (mx_el_gt, S, ND, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
196 NDCMP_OP_DECL (mx_el_eq, S, ND, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
197 NDCMP_OP_DECL (mx_el_ne, S, ND, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
198
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
199 #define SND_BOOL_OP_DECLS(S, ND, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
200 NDBOOL_OP_DECL (mx_el_and, S, ND, API); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
201 NDBOOL_OP_DECL (mx_el_or, S, ND, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
202 NDBOOL_OP_DECL (mx_el_and_not, S, ND, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
203 NDBOOL_OP_DECL (mx_el_or_not, S, ND, API);
8774
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
204
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
205 #define SND_OP_DECLS(R, S, ND, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
206 SND_BIN_OP_DECLS (R, S, ND, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
207 SND_CMP_OP_DECLS (S, ND, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
208 SND_BOOL_OP_DECLS (S, ND, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
209
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
210 // N-d matrix by N-d matrix operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
211
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
212 #define NDND_BIN_OP_DECLS(R, ND1, ND2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
213 BIN_OP_DECL (R, operator +, ND1, ND2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
214 BIN_OP_DECL (R, operator -, ND1, ND2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
215 BIN_OP_DECL (R, product, ND1, ND2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
216 BIN_OP_DECL (R, quotient, ND1, ND2, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
217
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
218 #define NDND_CMP_OP_DECLS(ND1, ND2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
219 NDCMP_OP_DECL (mx_el_lt, ND1, ND2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
220 NDCMP_OP_DECL (mx_el_le, ND1, ND2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
221 NDCMP_OP_DECL (mx_el_ge, ND1, ND2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
222 NDCMP_OP_DECL (mx_el_gt, ND1, ND2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
223 NDCMP_OP_DECL (mx_el_eq, ND1, ND2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
224 NDCMP_OP_DECL (mx_el_ne, ND1, ND2, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
225
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
226 #define NDND_BOOL_OP_DECLS(ND1, ND2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
227 NDBOOL_OP_DECL (mx_el_and, ND1, ND2, API); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
228 NDBOOL_OP_DECL (mx_el_or, ND1, ND2, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
229 NDBOOL_OP_DECL (mx_el_and_not, ND1, ND2, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
230 NDBOOL_OP_DECL (mx_el_or_not, ND1, ND2, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
231 NDBOOL_OP_DECL (mx_el_not_and, ND1, ND2, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
232 NDBOOL_OP_DECL (mx_el_not_or, ND1, ND2, API);
8774
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
233
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
234 #define NDND_OP_DECLS(R, ND1, ND2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
235 NDND_BIN_OP_DECLS (R, ND1, ND2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
236 NDND_CMP_OP_DECLS (ND1, ND2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
237 NDND_BOOL_OP_DECLS (ND1, ND2, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
238
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
239 // scalar by diagonal matrix operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
240
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
241 #define SDM_BIN_OP_DECLS(R, S, DM, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
242 BIN_OP_DECL (R, operator +, S, DM, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
243 BIN_OP_DECL (R, operator -, S, DM, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
244
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
245 #define SDM_OP_DECLS(R, S, DM, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
246 SDM_BIN_OP_DECLS(R, S, DM, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
247
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
248 // diagonal matrix by scalar operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
249
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
250 #define DMS_BIN_OP_DECLS(R, DM, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
251 BIN_OP_DECL (R, operator +, DM, S, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
252 BIN_OP_DECL (R, operator -, DM, S, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
253
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
254 #define DMS_OP_DECLS(R, DM, S, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
255 DMS_BIN_OP_DECLS(R, DM, S, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
256
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
257 // matrix by diagonal matrix operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
258
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
259 #define MDM_BIN_OP_DECLS(R, M, DM, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
260 BIN_OP_DECL (R, operator +, M, DM, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
261 BIN_OP_DECL (R, operator -, M, DM, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
262 BIN_OP_DECL (R, operator *, M, DM, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
263
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
264 #define MDM_OP_DECLS(R, M, DM, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
265 MDM_BIN_OP_DECLS(R, M, DM, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
266
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
267 // diagonal matrix by matrix operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
268
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
269 #define DMM_BIN_OP_DECLS(R, DM, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
270 BIN_OP_DECL (R, operator +, DM, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
271 BIN_OP_DECL (R, operator -, DM, M, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
272 BIN_OP_DECL (R, operator *, DM, M, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
273
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
274 #define DMM_OP_DECLS(R, DM, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
275 DMM_BIN_OP_DECLS(R, DM, M, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
276
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
277 // diagonal matrix by diagonal matrix operations.
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
278
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
279 #define DMDM_BIN_OP_DECLS(R, DM1, DM2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
280 BIN_OP_DECL (R, operator +, DM1, DM2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
281 BIN_OP_DECL (R, operator -, DM1, DM2, API); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
282 BIN_OP_DECL (R, product, DM1, DM2, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
283
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
284 #define DMDM_OP_DECLS(R, DM1, DM2, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
285 DMDM_BIN_OP_DECLS (R, DM1, DM2, API)
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
286
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
287 // scalar by N-d array min/max ops
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
288
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
289 #define MINMAX_DECLS(T) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
290 extern OCTAVE_API T ## NDArray min (octave_ ## T d, const T ## NDArray& m); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
291 extern OCTAVE_API T ## NDArray min (const T ## NDArray& m, octave_ ## T d); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
292 extern OCTAVE_API T ## NDArray min (const T ## NDArray& a, \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
293 const T ## NDArray& b); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
294 extern OCTAVE_API T ## NDArray max (octave_ ## T d, const T ## NDArray& m); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
295 extern OCTAVE_API T ## NDArray max (const T ## NDArray& m, octave_ ## T d); \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
296 extern OCTAVE_API T ## NDArray max (const T ## NDArray& a, \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
297 const T ## NDArray& b);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
298
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
299 // permutation matrix by matrix ops and vice versa
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
300
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
301 #define PMM_BIN_OP_DECLS(R, PM, M, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
302 BIN_OP_DECL (R, operator *, PM, M, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
303
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
304 #define MPM_BIN_OP_DECLS(R, M, PM, API) \
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
305 BIN_OP_DECL (R, operator *, M, PM, API);
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
306
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
307 #endif
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
308