21 complex(
double real,
double imag);
26 double re()
const {
return z[0]; }
27 double im()
const {
return z[1]; }
complex operator+(complex a, complex b)
Definition: complex.h:51
A complex number class, consisting of t.
Definition: complex.h:16
double re() const
Definition: complex.h:26
void setIm(double im)
Definition: complex.h:29
double norm()
Definition: complex.cpp:45
void setRe(double re)
Definition: complex.h:28
complex zeros()
Definition: complex.cpp:86
friend std::ostream & operator<<(std::ostream &os, const complex &a)
Definition: complex.cpp:191
complex operator/(complex a, complex b)
Definition: complex.h:87
complex & operator=(const complex &b)
Definition: complex.cpp:93
complex operator *(complex a, complex b)
Definition: complex.h:75
complex & operator/=(complex b)
Definition: complex.cpp:136
complex operator-(complex a, complex b)
Definition: complex.h:63
double normSquared()
Definition: complex.cpp:53
~complex()
Definition: complex.cpp:19
complex conjugate()
complex::conjugate
Definition: complex.cpp:65
double z[2]
Definition: complex.h:25
complex & operator-=(complex b)
Definition: complex.cpp:158
complex()
Definition: complex.cpp:10
complex & operator *=(complex b)
Definition: complex.cpp:113
complex operator-() const
Definition: complex.cpp:186
complex & operator+=(complex b)
Definition: complex.cpp:103
double im() const
Definition: complex.h:27
complex c()
complex::c
Definition: complex.cpp:78