GQCP
Loading...
Searching...
No Matches
complex.hpp
Go to the documentation of this file.
1// This file is part of GQCG-GQCP.
2//
3// Copyright (C) 2017-2020 the GQCG developers
4//
5// GQCG-GQCP is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// GQCG-GQCP is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with GQCG-GQCP. If not, see <http://www.gnu.org/licenses/>.
17
18#pragma once
19
21
22#include <complex>
23
24
25namespace GQCP {
26
27
31using complex = std::complex<double>;
32
33
41complex conj(const complex& c);
42
43
47double conj(const double d);
48
49
50template <typename T>
52
53template <typename T>
55
56
57namespace literals {
58
59
65constexpr std::complex<double> operator"" _ii(unsigned long long d) {
66 return std::complex<double> {0.0, static_cast<double>(d)};
67}
68
74constexpr std::complex<double> operator"" _ii(long double d) {
75 return std::complex<double> {0.0, static_cast<double>(d)};
76}
77
78
79} // namespace literals
80
81
82} // namespace GQCP
Definition: BaseOneElectronIntegralBuffer.hpp:25
typename std::enable_if< B, T >::type enable_if_t
Definition: type_traits.hpp:37
std::complex< double > complex
Definition: complex.hpp:31
enable_if_t< std::is_same< T, double >::value > IsReal
Definition: complex.hpp:51
enable_if_t< std::is_same< T, complex >::value > IsComplex
Definition: complex.hpp:54
complex conj(const complex &c)
Definition: complex.cpp:31