ARTS
2.2.66
complex.cc
Go to the documentation of this file.
1
/* Copyright (C) 2002-2012 Stefan Buehler <sbuehler@ltu.se>
2
3
This program is free software; you can redistribute it and/or modify it
4
under the terms of the GNU General Public License as published by the
5
Free Software Foundation; either version 2, or (at your option) any
6
later version.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16
USA. */
17
26
#include "
complex.h
"
27
28
using
std::complex;
29
30
complex<float>
operator+
(
const
double
& d,
const
complex<float>
& c)
31
{
32
return
(
float
(d) + c);
33
}
34
35
complex<float>
operator*
(
const
double
& d,
const
complex<float>
& c)
36
{
37
return
(
float
(d) * c);
38
}
39
40
41
complex<float>
operator+
(
const
complex<float>
& c,
const
double
& d)
42
{
43
return
(c +
float
(d));
44
}
45
46
complex<float>
operator*
(
const
complex<float>
& c,
const
double
& d)
47
{
48
return
(c *
float
(d));
49
}
50
51
52
53
complex<double>
operator+
(
const
float
& f,
const
complex<double>
& c)
54
{
55
return
(
double
(f) + c);
56
}
57
58
complex<double>
operator*
(
const
float
& f,
const
complex<double>
& c)
59
{
60
return
(
double
(f) * c);
61
}
62
63
complex<double>
operator+
(
const
complex<double>
& c,
const
float
& f)
64
{
65
return
(c +
double
(f));
66
}
67
68
complex<double>
operator*
(
const
complex<double>
& c,
const
float
& f)
69
{
70
return
(c *
double
(f));
71
}
72
complex.h
A class implementing complex numbers for ARTS.
operator+
complex< float > operator+(const double &d, const complex< float > &c)
Definition:
complex.cc:30
operator*
complex< float > operator*(const double &d, const complex< float > &c)
Definition:
complex.cc:35
complex
Definition:
continua.cc:20317
arts-2.2
src
complex.cc
Generated on Wed Mar 18 2020 07:04:09 for ARTS by
1.8.13