LevelS C++ support library  3.83
xcomplex.h
Go to the documentation of this file.
1 /*
2  * This file is part of libcxxsupport.
3  *
4  * libcxxsupport is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * libcxxsupport is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with libcxxsupport; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 /*
20  * libcxxsupport is being developed at the Max-Planck-Institut fuer Astrophysik
21  * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt
22  * (DLR).
23  */
24 
25 /*! \file xcomplex.h
26  * convenience additions for std::complex
27  *
28  * Copyright (C) 2003-2015 Max-Planck-Society
29  * \author Martin Reinecke
30  */
31 
32 #ifndef PLANCK_XCOMPLEX_H
33 #define PLANCK_XCOMPLEX_H
34 
35 #include <complex>
36 
37 #define xcomplex std::complex
38 typedef xcomplex<float> fcomplex;
39 typedef xcomplex<double> dcomplex;
40 
41 template<typename T> inline xcomplex<T> times_i(xcomplex<T> inp)
42  { return xcomplex<T>(-inp.imag(),inp.real()); }
43 
44 #endif

Generated on Wed Nov 13 2024 12:18:16 for LevelS C++ support library