GNU Octave
9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-cmplx.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 1995-2024 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_cmplx_h)
27
#define octave_oct_cmplx_h 1
28
29
#include "octave-config.h"
30
31
#include <complex>
32
33
typedef
std::complex<double>
Complex
;
34
typedef
std::complex<float>
FloatComplex
;
35
36
// template declaration
37
# define DECL_COMPLEXR_COMP(OP) \
38
template <typename T> bool operator OP (const std::complex<T>& a, \
39
const std::complex<T>& b); \
40
template <typename T> bool operator OP (const std::complex<T>& a, T b); \
41
template <typename T> bool operator OP (T a, const std::complex<T>& b);
42
43
DECL_COMPLEXR_COMP
(>)
44
DECL_COMPLEXR_COMP
(<)
45
DECL_COMPLEXR_COMP
(>=)
46
DECL_COMPLEXR_COMP
(<=)
47
48
// extern template instantiations
49
# define EXT_INST_COMPLEXR_COMP(OP, T) \
50
extern template OCTAVE_EXTERN_TEMPLATE_API \
51
bool operator OP (const std::complex<T>& a, const std::complex<T>& b); \
52
extern template OCTAVE_EXTERN_TEMPLATE_API \
53
bool operator OP (const std::complex<T>& a, T b); \
54
extern template OCTAVE_EXTERN_TEMPLATE_API \
55
bool operator OP (T a, const std::complex<T>& b);
56
57
EXT_INST_COMPLEXR_COMP
(>,
double
)
58
EXT_INST_COMPLEXR_COMP
(>,
float
)
59
EXT_INST_COMPLEXR_COMP
(<,
double
)
60
EXT_INST_COMPLEXR_COMP
(<,
float
)
61
EXT_INST_COMPLEXR_COMP
(>=,
double
)
62
EXT_INST_COMPLEXR_COMP
(>=,
float
)
63
EXT_INST_COMPLEXR_COMP
(<=,
double
)
64
EXT_INST_COMPLEXR_COMP
(<=,
float
)
65
66
#endif
Complex
std::complex< double > Complex
Definition:
oct-cmplx.h:33
DECL_COMPLEXR_COMP
#define DECL_COMPLEXR_COMP(OP)
Definition:
oct-cmplx.h:37
FloatComplex
std::complex< float > FloatComplex
Definition:
oct-cmplx.h:34
EXT_INST_COMPLEXR_COMP
#define EXT_INST_COMPLEXR_COMP(OP, T)
Definition:
oct-cmplx.h:49
liboctave
util
oct-cmplx.h
Generated on Sun Mar 17 2024 22:36:52 for GNU Octave by
1.9.1