GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
oct-convn.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2009-2025 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
57
59
66
67// double real X double real
68
70convn (const NDArray& a, const NDArray& b, convn_type ct);
71
72extern OCTAVE_API Matrix
73convn (const Matrix& a, const Matrix& b, convn_type ct);
74
75extern OCTAVE_API Matrix
76convn (const Matrix& a, const ColumnVector& c, const RowVector& r,
77 convn_type ct);
78
79// double complex X double real
80
82convn (const ComplexNDArray& a, const NDArray& b, convn_type ct);
83
85convn (const ComplexMatrix& a, const Matrix& b, convn_type ct);
86
88convn (const ComplexMatrix& a, const ColumnVector& c, const RowVector& r,
89 convn_type ct);
90
91// double complex X double complex
92
94convn (const ComplexNDArray& a, const ComplexNDArray& b, convn_type ct);
95
97convn (const ComplexMatrix& a, const ComplexMatrix& b, convn_type ct);
98
100convn (const ComplexMatrix& a, const ComplexColumnVector& c,
101 const ComplexRowVector& r, convn_type ct);
102
103// float real X float real
104
106convn (const FloatNDArray& a, const FloatNDArray& b, convn_type ct);
107
109convn (const FloatMatrix& a, const FloatMatrix& b, convn_type ct);
110
112convn (const FloatMatrix& a, const FloatColumnVector& c,
113 const FloatRowVector& r, convn_type ct);
114
115// float complex X float real
116
118convn (const FloatComplexNDArray& a, const FloatNDArray& b, convn_type ct);
119
121convn (const FloatComplexMatrix& a, const FloatMatrix& b, convn_type ct);
122
124convn (const FloatComplexMatrix& a, const FloatColumnVector& c,
125 const FloatRowVector& r, convn_type ct);
126
127// float complex X float complex
128
131 convn_type ct);
132
135 convn_type ct);
136
139 const FloatComplexRowVector& r, convn_type ct);
140
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
159OCTAVE_END_NAMESPACE(octave)
160
161#endif
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define OCTAVE_API
Definition main.in.cc:55
convn_type
Definition oct-convn.h:52
@ convn_same
Definition oct-convn.h:54
@ convn_valid
Definition oct-convn.h:55
@ convn_full
Definition oct-convn.h:53
convn_type convert_enum(::convn_type ct)
Definition oct-convn.h:141
NDArray convn(const NDArray &a, const NDArray &b, convn_type ct)
Definition oct-convn.cc:219