Complex number.
More...
#include <Complex.h>
|
std::complex< double > & | operator+= (std::complex< double > &lhs, const Complex &rhs) |
|
Complex | operator+ (const Complex &lhs, const double &rhs) |
|
Complex | operator+ (const double &lhs, const Complex &rhs) |
|
Complex | operator- (const Complex &lhs, const double &rhs) |
|
Complex | operator- (const double &lhs, const Complex &rhs) |
|
Complex | operator* (const Complex &lhs, const double &rhs) |
|
Complex | operator* (const double &lhs, const Complex &rhs) |
|
Complex | operator/ (const Complex &lhs, const double &rhs) |
|
std::ostream & | operator<< (std::ostream &os, const Complex &complex) |
|
std::istream & | operator>> (std::istream &is, Complex &complex) |
|
constexpr friend Real | real (const Complex &complex) |
|
constexpr friend Real | imag (const Complex &complex) |
|
Complex | conj (const Complex &complex) |
|
Real | abs (const Complex &complex) |
|
◆ Complex() [1/5]
TBTK::Complex::Complex |
( |
| ) |
|
|
inline |
◆ Complex() [2/5]
constexpr TBTK::Complex::Complex |
( |
std::complex< double > |
value | ) |
|
|
inlineconstexpr |
Constructor.
- Parameters
-
value | The value to initilize the Complex with. |
◆ Complex() [3/5]
constexpr TBTK::Complex::Complex |
( |
Real |
real, |
|
|
Real |
imag |
|
) |
| |
|
inlineconstexpr |
Constructor.
- Parameters
-
value | The value to initilize the Complex with. |
◆ Complex() [4/5]
constexpr TBTK::Complex::Complex |
( |
double |
value | ) |
|
|
inlineconstexpr |
Constructor.
- Parameters
-
value | The value to initilize the Complex with. |
◆ Complex() [5/5]
Constructs an Index from a serialization string.
- Parameters
-
serialization | Serialization string from which to construct the Complex. |
mode | Mode with which the string has been serialized. |
◆ operator std::complex< double >()
constexpr TBTK::Complex::operator std::complex< double > |
( |
| ) |
const |
|
inlineconstexpr |
Type conversion operator.
◆ operator!=()
Not equal operator.
- Parameters
-
- Returns
- False if the two Complex numbers are equal, otherwise true.
◆ operator*=()
Multiplication assignment operator.
- Parameters
-
- Returns
- The Complex after the multiplication has occured.
◆ operator+=()
Addition assignment operator.
- Parameters
-
- Returns
- The Complex after the addition has occured.
◆ operator-() [1/2]
Complex TBTK::Complex::operator- |
( |
| ) |
const |
|
inline |
Unary minus operator.
- Returns
- The negative of the Complex number.
◆ operator-() [2/2]
Subtraction operator.
- Parameters
-
- Returns
- The result of the subtraction.
◆ operator-=()
Subtraction assignment operator.
- Parameters
-
- Returns
- The Complex after the subtraction has occured.
◆ operator/=()
Division assignment operator.
- Parameters
-
- Returns
- The Complex after the division has occured.
◆ operator=()
Complex& TBTK::Complex::operator= |
( |
const std::complex< double > & |
rhs | ) |
|
|
inline |
Assignment operator.
- Parameters
-
value | The value to assign the Complex. |
- Returns
- The Complex after assignment has occured.
◆ operator==()
Comparison operator.
- Parameters
-
- Returns
- True if the two Complex numbers are equal, otherwise false.
◆ serialize()
◆ abs
Absolute value.
- Parameters
-
- Returns
- The absolute value.
◆ conj
Complex conjugate.
- Parameters
-
- Returns
- The complex conjugate.
◆ imag
Get the imaginary part.
- Parameters
-
- Returns
- The imaginary part.
◆ operator* [1/2]
Multiplication operator.
- Parameters
-
lhs | The left hand side. |
rhs | The right hand side. |
- Returns
- The result of the multiplication.
◆ operator* [2/2]
Multiplication operator.
- Parameters
-
lhs | The left hand side. |
rhs | The right hand side. |
- Returns
- The result of the multiplication.
◆ operator+ [1/2]
Addition operator.
- Parameters
-
lhs | The left hand side. |
rhs | The right hand side. |
- Returns
- The result of the addition.
◆ operator+ [2/2]
Addition operator.
- Parameters
-
lhs | The left hand side. |
rhs | The right hand side. |
- Returns
- The result of the addition.
◆ operator+=
std::complex<double>& operator+= |
( |
std::complex< double > & |
lhs, |
|
|
const Complex & |
rhs |
|
) |
| |
|
friend |
Addition assignment operator.
- Parameters
-
lhs | The left hand side. |
rhs | The right hand side. |
- Returns
- The left hand side after the addition has occured.
◆ operator- [1/2]
Subtraction operator.
- Parameters
-
lhs | The left hand side. |
rhs | The right hand side. |
- Returns
- The result of the subtraction.
◆ operator- [2/2]
Subtraction operator.
- Parameters
-
lhs | The left hand side. |
rhs | The right hand side. |
- Returns
- The result of the subtraction.
◆ operator/
Division operator.
- Parameters
-
- Returns
- The result of the division.
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Complex & |
complex |
|
) |
| |
|
friend |
ostream operator.
- Parameters
-
os | The ostream to write to. |
complex | The Complex to write. |
- Returns
- The ostream.
◆ operator>>
std::istream& operator>> |
( |
std::istream & |
is, |
|
|
Complex & |
complex |
|
) |
| |
|
friend |
istream operator.
- Parameters
-
is | The istream to read from. |
complex | The Complex to read to. |
- Returns
- The istream.
◆ real
Get the real part.
- Parameters
-
- Returns
- The real part.
The documentation for this class was generated from the following file: