41 inline double real(
const double& r);
55 CComplexType(
const double& d) : std::complex<double>(d) {}
57 CComplexType(
const double& r,
const double& i) : std::complex<double>(r,i) {}
59 CComplexType(
const std::complex<double>& z) : std::complex<double>(z) {}
61 CComplexType(
const std::complex<float>& z) : std::complex<double>(z) {}
63 operator double() {
return this->real();}
65 operator int() {
return int(this->real());}
67 operator short() {
return short(this->real());}
75 template<
typename T,
typename Z>
76 friend bool operator==(
const Z&,
const T&);
78 template<
typename T,
typename Z>
79 friend bool operator!=(
const Z&,
const T&);
81 template<
typename T,
typename Z>
82 friend bool operator<(
const Z&,
const T&);
84 template<
typename T,
typename Z>
85 friend bool operator>(
const Z&,
const T&);
87 template<
typename T,
typename Z>
88 friend bool operator<=(
const Z&,
const T&);
90 template<
typename T,
typename Z>
91 friend bool operator>=(
const Z&,
const T&);
171 friend std::ostream& operator<< (std::ostream &out,
const CComplexType &);
Class for defining the complex datatype for complex step gradient computation. Based on complexify...
Definition: complex_structure.hpp:51