annotate liboctave/mx-op-decl.h @ 12312:b10ea6efdc58 release-3-4-x ss-3-3-91

version is now 3.3.91
author John W. Eaton <jwe@octave.org>
date Mon, 31 Jan 2011 08:36:58 -0500
parents fd0a3ac60b0e
children 72c96de7a403
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
11523
fd0a3ac60b0e update copyright notices
John W. Eaton <jwe@octave.org>
parents: 10521
diff changeset
3 Copyright (C) 1996-2011 John W. Eaton
fd0a3ac60b0e update copyright notices
John W. Eaton <jwe@octave.org>
parents: 10521
diff changeset
4 Copyright (C) 2008-2009 Jaroslav Hajek
10521
4d1fc073fbb7 add some missing copyright stmts
Jaroslav Hajek <highegg@gmail.com>
parents: 10329
diff changeset
5 Copyright (C) 2009 VZLU Prague, a.s.
8774
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 #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
29 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
30
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
31 class boolMatrix;
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
32 class boolNDArray;
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
33
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
34 #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
35 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
36
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
37 #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
38 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
39
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
40 #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
41 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
42
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
43 #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
44 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
45
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
46 // vector by scalar operations.
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 #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
49 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
50 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
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
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
54 #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
55 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
56
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
57 // 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
58
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
59 #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
60 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
61 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
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
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
65 #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
66 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
67
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
68 // vector by vector operations.
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 #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
71 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
72 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
73 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
74 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
75
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
76 #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
77 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
78
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
79 // matrix by scalar operations.
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 #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
82 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
83 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
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
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
87 #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
88 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
89 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
90 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
91 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
92 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
93 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
94
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
95 #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
96 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
97 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
98
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
99 #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
100 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
101 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
102 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
103
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
104 // scalar by matrix operations.
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 #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
107 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
108 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
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
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
112 #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
113 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
114 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
115 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
116 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
117 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
118 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
119
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
120 #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
121 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
122 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
123
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
124 #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
125 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
126 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
127 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
128
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
129 // matrix by matrix operations.
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 #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
132 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
133 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
134 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
135 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
136
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
137 #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
138 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
139 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
140 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
141 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
142 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
143 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
144
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
145 #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
146 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
147 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
148
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
149 #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
150 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
151 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
152 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
153
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
154 // 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
155
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
156 #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
157 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
158 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
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
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
162 #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
163 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
164 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
165 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
166 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
167 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
168 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
169
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
170 #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
171 NDBOOL_OP_DECL (mx_el_and, ND, S, API); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
172 NDBOOL_OP_DECL (mx_el_or, ND, S, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
173 NDBOOL_OP_DECL (mx_el_not_and, ND, S, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
174 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
175
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
176 #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
177 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
178 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
179 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
180
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
181 // 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
182
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
183 #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
184 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
185 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
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
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
189 #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
190 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
191 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
192 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
193 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
194 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
195 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
196
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
197 #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
198 NDBOOL_OP_DECL (mx_el_and, S, ND, API); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
199 NDBOOL_OP_DECL (mx_el_or, S, ND, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
200 NDBOOL_OP_DECL (mx_el_and_not, S, ND, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
201 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
202
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
203 #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
204 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
205 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
206 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
207
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
208 // 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
209
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
210 #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
211 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
212 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
213 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
214 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
215
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
216 #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
217 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
218 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
219 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
220 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
221 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
222 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
223
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
224 #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
225 NDBOOL_OP_DECL (mx_el_and, ND1, ND2, API); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
226 NDBOOL_OP_DECL (mx_el_or, ND1, ND2, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
227 NDBOOL_OP_DECL (mx_el_and_not, ND1, ND2, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
228 NDBOOL_OP_DECL (mx_el_or_not, ND1, ND2, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
229 NDBOOL_OP_DECL (mx_el_not_and, ND1, ND2, API); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8774
diff changeset
230 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
231
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
232 #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
233 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
234 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
235 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
236
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
237 // 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
238
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
239 #define SDM_BIN_OP_DECLS(R, S, DM, API) \
9732
b4fdfee405b5 remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents: 9648
diff changeset
240 BIN_OP_DECL (R, operator *, S, DM, API); \
8774
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
241
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
242 #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
243 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
244
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
245 // 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
246
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
247 #define DMS_BIN_OP_DECLS(R, DM, S, API) \
9732
b4fdfee405b5 remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents: 9648
diff changeset
248 BIN_OP_DECL (R, operator *, DM, S, API); \
b4fdfee405b5 remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents: 9648
diff changeset
249 BIN_OP_DECL (R, operator /, DM, S, API);
8774
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
250
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
251 #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
252 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
253
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
254 // 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
255
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
256 #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
257 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
258 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
259 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
260
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
261 #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
262 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
263
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
264 // 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
265
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
266 #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
267 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
268 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
269 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
270
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
271 #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
272 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
273
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
274 // 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
275
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
276 #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
277 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
278 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
279 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
280
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
281 #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
282 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
283
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
284 // 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
285
10329
83fa590b8a09 simplify min/max definitions in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 10312
diff changeset
286 #define MINMAX_DECLS(T, S, API) \
83fa590b8a09 simplify min/max definitions in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 10312
diff changeset
287 extern API T min (S d, const T& m); \
83fa590b8a09 simplify min/max definitions in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 10312
diff changeset
288 extern API T min (const T& m, S d); \
83fa590b8a09 simplify min/max definitions in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 10312
diff changeset
289 extern API T min (const T& a, const T& b); \
83fa590b8a09 simplify min/max definitions in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 10312
diff changeset
290 extern API T max (S d, const T& m); \
83fa590b8a09 simplify min/max definitions in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 10312
diff changeset
291 extern API T max (const T& m, S d); \
83fa590b8a09 simplify min/max definitions in liboctave
Jaroslav Hajek <highegg@gmail.com>
parents: 10312
diff changeset
292 extern API T max (const T& a, const T& b);
8774
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
293
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
294 // 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
295
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
296 #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
297 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
298
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
299 #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
300 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
301
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
302 #endif
b756ce0002db split implementation and interface in mx-op-defs and MArray-defs
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
303