GNU Octave
7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-convn.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 2009-2022 The Octave Project Developers
4
//
5
// See the file COPYRIGHT.md in the top-level directory of this
6
// distribution or <https://octave.org/copyright/>.
7
//
8
// This file is part of Octave.
9
//
10
// Octave is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Octave is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU General Public License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with Octave; see the file COPYING. If not, see
22
// <https://www.gnu.org/licenses/>.
23
//
24
////////////////////////////////////////////////////////////////////////
25
26
#if ! defined (octave_oct_convn_h)
27
#define octave_oct_convn_h 1
28
29
#include "octave-config.h"
30
31
#include "
mx-fwd.h
"
32
33
// The remaining includes can be removed when the global enum
34
// declaration, the convert_enum function, and the deprecated functions
35
// at the end of this file are removed.
36
37
#include <cstdlib>
38
#include "
dMatrix.h
"
39
#include "
dNDArray.h
"
40
#include "
CMatrix.h
"
41
#include "
CNDArray.h
"
42
#include "
fMatrix.h
"
43
#include "
fNDArray.h
"
44
#include "
fCMatrix.h
"
45
#include "
fCNDArray.h
"
46
47
// FIXME: Is there any sane way to move a global enum to a namespace and
48
// tag the global one as deprecated when it is used as a parameter in
49
// public functions that also need to be tagged as deprecated?
50
51
enum
convn_type
52
{
53
convn_full
,
54
convn_same
,
55
convn_valid
56
};
57
58
namespace
octave
59
{
60
enum
convn_type
61
{
62
convn_full
,
63
convn_same
,
64
convn_valid
65
};
66
67
// double real X double real
68
69
extern
OCTAVE_API
NDArray
70
convn
(
const
NDArray
& a,
const
NDArray
& b,
convn_type
ct);
71
72
extern
OCTAVE_API
Matrix
73
convn
(
const
Matrix
& a,
const
Matrix
& b,
convn_type
ct);
74
75
extern
OCTAVE_API
Matrix
76
convn
(
const
Matrix
& a,
const
ColumnVector
& c,
const
RowVector
& r,
77
convn_type
ct);
78
79
// double complex X double real
80
81
extern
OCTAVE_API
ComplexNDArray
82
convn
(
const
ComplexNDArray
& a,
const
NDArray
& b,
convn_type
ct);
83
84
extern
OCTAVE_API
ComplexMatrix
85
convn
(
const
ComplexMatrix
& a,
const
Matrix
& b,
convn_type
ct);
86
87
extern
OCTAVE_API
ComplexMatrix
88
convn
(
const
ComplexMatrix
& a,
const
ColumnVector
& c,
const
RowVector
& r,
89
convn_type
ct);
90
91
// double complex X double complex
92
93
extern
OCTAVE_API
ComplexNDArray
94
convn
(
const
ComplexNDArray
& a,
const
ComplexNDArray
& b,
convn_type
ct);
95
96
extern
OCTAVE_API
ComplexMatrix
97
convn
(
const
ComplexMatrix
& a,
const
ComplexMatrix
& b,
convn_type
ct);
98
99
extern
OCTAVE_API
ComplexMatrix
100
convn
(
const
ComplexMatrix
& a,
const
ComplexColumnVector
& c,
101
const
ComplexRowVector
& r,
convn_type
ct);
102
103
// float real X float real
104
105
extern
OCTAVE_API
FloatNDArray
106
convn
(
const
FloatNDArray
& a,
const
FloatNDArray
& b,
convn_type
ct);
107
108
extern
OCTAVE_API
FloatMatrix
109
convn
(
const
FloatMatrix
& a,
const
FloatMatrix
& b,
convn_type
ct);
110
111
extern
OCTAVE_API
FloatMatrix
112
convn
(
const
FloatMatrix
& a,
const
FloatColumnVector
& c,
113
const
FloatRowVector
& r,
convn_type
ct);
114
115
// float complex X float real
116
117
extern
OCTAVE_API
FloatComplexNDArray
118
convn
(
const
FloatComplexNDArray
& a,
const
FloatNDArray
& b,
convn_type
ct);
119
120
extern
OCTAVE_API
FloatComplexMatrix
121
convn
(
const
FloatComplexMatrix
& a,
const
FloatMatrix
& b,
convn_type
ct);
122
123
extern
OCTAVE_API
FloatComplexMatrix
124
convn
(
const
FloatComplexMatrix
& a,
const
FloatColumnVector
& c,
125
const
FloatRowVector
& r,
convn_type
ct);
126
127
// float complex X float complex
128
129
extern
OCTAVE_API
FloatComplexNDArray
130
convn
(
const
FloatComplexNDArray
& a,
const
FloatComplexNDArray
& b,
131
convn_type
ct);
132
133
extern
OCTAVE_API
FloatComplexMatrix
134
convn
(
const
FloatComplexMatrix
& a,
const
FloatComplexMatrix
& b,
135
convn_type
ct);
136
137
extern
OCTAVE_API
FloatComplexMatrix
138
convn
(
const
FloatComplexMatrix
& a,
const
FloatComplexColumnVector
& c,
139
const
FloatComplexRowVector
& r,
convn_type
ct);
140
141
convn_type
convert_enum
(
::convn_type
ct)
142
{
143
switch
(ct)
144
{
145
case ::convn_full
:
146
return
convn_full
;
147
148
case ::convn_same
:
149
return
convn_same
;
150
151
case ::convn_valid
:
152
return
convn_valid
;
153
154
default
:
155
abort ();
156
}
157
}
158
}
159
160
#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
161
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
162
inline
NDArray
163
convn
(const
NDArray
& a, const
NDArray
& b,
convn_type
ct)
164
{
165
return
octave::convn
(a, b,
static_cast<
octave::convn_type
>
(ct));
166
}
167
168
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
169
inline
Matrix
170
convn
(const
Matrix
& a, const
Matrix
& b,
convn_type
ct)
171
{
172
return
octave::convn
(a, b,
octave::convert_enum
(ct));
173
}
174
175
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
176
inline
Matrix
177
convn
(const
Matrix
& a, const
ColumnVector
& c, const
RowVector
& r,
178
convn_type
ct)
179
{
180
return
octave::convn
(a, c, r,
octave::convert_enum
(ct));
181
}
182
183
// double complex X double real
184
185
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
186
inline
ComplexNDArray
187
convn
(const
ComplexNDArray
& a, const
NDArray
& b,
convn_type
ct)
188
{
189
return
octave::convn
(a, b,
octave::convert_enum
(ct));
190
}
191
192
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
193
inline
ComplexMatrix
194
convn
(const
ComplexMatrix
& a, const
Matrix
& b,
convn_type
ct)
195
{
196
return
octave::convn
(a, b,
octave::convert_enum
(ct));
197
}
198
199
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
200
inline
ComplexMatrix
201
convn
(const
ComplexMatrix
& a, const
ColumnVector
& c, const
RowVector
& r,
202
convn_type
ct)
203
{
204
return
octave::convn
(a, c, r,
octave::convert_enum
(ct));
205
}
206
207
// double complex X double complex
208
209
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
210
inline
ComplexNDArray
211
convn
(const
ComplexNDArray
& a, const
ComplexNDArray
& b,
convn_type
ct)
212
{
213
return
octave::convn
(a, b,
octave::convert_enum
(ct));
214
}
215
216
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
217
inline
ComplexMatrix
218
convn
(const
ComplexMatrix
& a, const
ComplexMatrix
& b,
convn_type
ct)
219
{
220
return
octave::convn
(a, b,
octave::convert_enum
(ct));
221
}
222
223
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
224
inline
ComplexMatrix
225
convn
(const
ComplexMatrix
& a, const
ComplexColumnVector
& c,
226
const
ComplexRowVector
& r,
convn_type
ct)
227
{
228
return
octave::convn
(a, c, r,
octave::convert_enum
(ct));
229
}
230
231
// float real X float real
232
233
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
234
inline
FloatNDArray
235
convn
(const
FloatNDArray
& a, const
FloatNDArray
& b,
convn_type
ct)
236
{
237
return
octave::convn
(a, b,
octave::convert_enum
(ct));
238
}
239
240
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
241
inline
FloatMatrix
242
convn
(const
FloatMatrix
& a, const
FloatMatrix
& b,
convn_type
ct)
243
{
244
return
octave::convn
(a, b,
octave::convert_enum
(ct));
245
}
246
247
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
248
inline
FloatMatrix
249
convn
(const
FloatMatrix
& a, const
FloatColumnVector
& c,
250
const
FloatRowVector
& r,
convn_type
ct)
251
{
252
return
octave::convn
(a, c, r,
octave::convert_enum
(ct));
253
}
254
255
// float complex X float real
256
257
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
258
inline
FloatComplexNDArray
259
convn
(const
FloatComplexNDArray
& a, const
FloatNDArray
& b,
260
convn_type
ct)
261
{
262
return
octave::convn
(a, b,
octave::convert_enum
(ct));
263
}
264
265
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
266
inline
FloatComplexMatrix
267
convn
(const
FloatComplexMatrix
& a, const
FloatMatrix
& b,
268
convn_type
ct)
269
{
270
return
octave::convn
(a, b,
octave::convert_enum
(ct));
271
}
272
273
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
274
inline
FloatComplexMatrix
275
convn
(const
FloatComplexMatrix
& a, const
FloatColumnVector
& c,
276
const
FloatRowVector
& r,
convn_type
ct)
277
{
278
return
octave::convn
(a, c, r,
octave::convert_enum
(ct));
279
}
280
281
// float complex X float complex
282
283
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
284
inline
FloatComplexNDArray
285
convn
(const
FloatComplexNDArray
& a, const
FloatComplexNDArray
& b,
286
convn_type
ct)
287
{
288
return
octave::convn
(a, b,
octave::convert_enum
(ct));
289
}
290
291
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
292
inline
FloatComplexMatrix
293
convn
(const
FloatComplexMatrix
& a, const
FloatComplexMatrix
& b,
294
convn_type
ct)
295
{
296
return
octave::convn
(a, b,
octave::convert_enum
(ct));
297
}
298
299
OCTAVE_DEPRECATED (7,
"use 'octave::convn' instead"
)
300
inline
FloatComplexMatrix
301
convn
(const
FloatComplexMatrix
& a, const
FloatComplexColumnVector
& c,
302
const
FloatComplexRowVector
& r,
convn_type
ct)
303
{
304
return
octave::convn
(a, c, r,
octave::convert_enum
(ct));
305
}
306
#endif
307
308
#endif
CMatrix.h
CNDArray.h
ColumnVector
Definition:
dColVector.h:37
ComplexColumnVector
Definition:
CColVector.h:37
ComplexMatrix
Definition:
CMatrix.h:43
ComplexNDArray
Definition:
CNDArray.h:39
ComplexRowVector
Definition:
CRowVector.h:38
FloatColumnVector
Definition:
fColVector.h:37
FloatComplexColumnVector
Definition:
fCColVector.h:37
FloatComplexMatrix
Definition:
fCMatrix.h:43
FloatComplexNDArray
Definition:
fCNDArray.h:39
FloatComplexRowVector
Definition:
fCRowVector.h:38
FloatMatrix
Definition:
fMatrix.h:42
FloatNDArray
Definition:
fNDArray.h:40
FloatRowVector
Definition:
fRowVector.h:37
Matrix
Definition:
dMatrix.h:42
NDArray
Definition:
dNDArray.h:40
RowVector
Definition:
dRowVector.h:37
dMatrix.h
dNDArray.h
fCMatrix.h
fCNDArray.h
fMatrix.h
fNDArray.h
OCTAVE_API
#define OCTAVE_API
Definition:
main.in.cc:55
mx-fwd.h
octave
Definition:
idx-vector.cc:46
octave::convn_type
convn_type
Definition:
oct-convn.h:61
octave::convn_same
@ convn_same
Definition:
oct-convn.h:63
octave::convn_full
@ convn_full
Definition:
oct-convn.h:62
octave::convn_valid
@ convn_valid
Definition:
oct-convn.h:64
octave::convert_enum
convn_type convert_enum(::convn_type ct)
Definition:
oct-convn.h:141
octave::convn
NDArray convn(const NDArray &a, const NDArray &b, convn_type ct)
Definition:
oct-convn.cc:213
convn_type
convn_type
Definition:
oct-convn.h:52
convn_full
@ convn_full
Definition:
oct-convn.h:53
convn_valid
@ convn_valid
Definition:
oct-convn.h:55
convn_same
@ convn_same
Definition:
oct-convn.h:54
liboctave
numeric
oct-convn.h
Generated on Sun Jun 26 2022 01:28:01 for GNU Octave by
1.9.4