Complex Number 0.1.2 |
Representation of a complex number. More...
#include "ComplexNumber.h"
#include "MathExceptions.h"
#include "Namespace.h"
#include <iostream>
#include <cmath>
Go to the source code of this file.
Namespaces | |
namespace | math |
Math namespace. | |
namespace | complex |
Complex namespace. | |
Defines | |
#define | COMPLEX_NUMBER_CPP |
Functions | |
template<class T > | |
ComplexNumber< T > | operator+ (const ComplexNumber< T > &lhs, const ComplexNumber< T > &rhs) |
template<class T > | |
ComplexNumber< T > | operator+ (const ComplexNumber< T > &lhs, const T &rhs) |
template<class T > | |
ComplexNumber< T > | operator+ (const T &lhs, const ComplexNumber< T > &rhs) |
template<class T > | |
ComplexNumber< T > | operator- (const ComplexNumber< T > &lhs, const ComplexNumber< T > &rhs) |
template<class T > | |
ComplexNumber< T > | operator- (const ComplexNumber< T > &lhs, const T &rhs) |
template<class T > | |
ComplexNumber< T > | operator- (const T &lhs, const ComplexNumber< T > &rhs) |
template<class T > | |
ComplexNumber< T > | operator* (const ComplexNumber< T > &lhs, const ComplexNumber< T > &rhs) |
template<class T > | |
ComplexNumber< T > | operator* (const ComplexNumber< T > &lhs, const T &rhs) |
template<class T > | |
ComplexNumber< T > | operator* (const T &lhs, const ComplexNumber< T > &rhs) |
template<class T > | |
ComplexNumber< T > | operator/ (const ComplexNumber< T > &lhs, const ComplexNumber< T > &rhs) |
template<class T > | |
ComplexNumber< T > | operator/ (const ComplexNumber< T > &lhs, const T &rhs) |
template<class T > | |
ComplexNumber< T > | operator/ (const T &lhs, const ComplexNumber< T > &rhs) |
template<class T , class U > | |
bool | operator== (const ComplexNumber< T > &lhs, const ComplexNumber< U > &rhs) |
template<class T , class U > | |
bool | operator== (const ComplexNumber< T > &lhs, const U &rhs) |
template<class T , class U > | |
bool | operator== (const T &lhs, const ComplexNumber< U > &rhs) |
template<class T , class U > | |
bool | operator!= (const ComplexNumber< T > &lhs, const ComplexNumber< U > &rhs) |
template<class T , class U > | |
bool | operator!= (const ComplexNumber< T > &lhs, const U &rhs) |
template<class T , class U > | |
bool | operator!= (const T &lhs, const ComplexNumber< U > &rhs) |
template<class U > | |
std::ostream & | operator<< (std::ostream &out, const ComplexNumber< U > &z) |
template<class U > | |
std::istream & | operator>> (std::istream &in, ComplexNumber< U > &z) |
Representation of a complex number.
This file contains the implementation of the class template that represents a complex number, its function template implementations as well as its overloaded operators
Definition in file ComplexNumber.cpp.
#define COMPLEX_NUMBER_CPP |
Definition at line 25 of file ComplexNumber.cpp.
bool operator!= | ( | const ComplexNumber< T > & | lhs, |
const ComplexNumber< U > & | rhs | ||
) | [related] |
Definition at line 355 of file ComplexNumber.cpp.
bool operator!= | ( | const ComplexNumber< T > & | lhs, |
const U & | rhs | ||
) | [related] |
Definition at line 361 of file ComplexNumber.cpp.
bool operator!= | ( | const T & | lhs, |
const ComplexNumber< U > & | rhs | ||
) | [related] |
Definition at line 366 of file ComplexNumber.cpp.
ComplexNumber<T> operator* | ( | const ComplexNumber< T > & | lhs, |
const ComplexNumber< T > & | rhs | ||
) | [related] |
Definition at line 280 of file ComplexNumber.cpp.
ComplexNumber<T> operator* | ( | const ComplexNumber< T > & | lhs, |
const T & | rhs | ||
) | [related] |
Definition at line 289 of file ComplexNumber.cpp.
ComplexNumber<T> operator* | ( | const T & | lhs, |
const ComplexNumber< T > & | rhs | ||
) | [related] |
Definition at line 294 of file ComplexNumber.cpp.
ComplexNumber<T> operator+ | ( | const ComplexNumber< T > & | lhs, |
const ComplexNumber< T > & | rhs | ||
) | [related] |
Definition at line 246 of file ComplexNumber.cpp.
ComplexNumber<T> operator+ | ( | const ComplexNumber< T > & | lhs, |
const T & | rhs | ||
) | [related] |
Definition at line 253 of file ComplexNumber.cpp.
ComplexNumber<T> operator+ | ( | const T & | lhs, |
const ComplexNumber< T > & | rhs | ||
) | [related] |
Definition at line 258 of file ComplexNumber.cpp.
ComplexNumber<T> operator- | ( | const ComplexNumber< T > & | lhs, |
const ComplexNumber< T > & | rhs | ||
) | [related] |
Definition at line 263 of file ComplexNumber.cpp.
ComplexNumber<T> operator- | ( | const ComplexNumber< T > & | lhs, |
const T & | rhs | ||
) | [related] |
Definition at line 270 of file ComplexNumber.cpp.
ComplexNumber<T> operator- | ( | const T & | lhs, |
const ComplexNumber< T > & | rhs | ||
) | [related] |
Definition at line 275 of file ComplexNumber.cpp.
ComplexNumber<T> operator/ | ( | const ComplexNumber< T > & | lhs, |
const ComplexNumber< T > & | rhs | ||
) | [related] |
Definition at line 299 of file ComplexNumber.cpp.
ComplexNumber<T> operator/ | ( | const ComplexNumber< T > & | lhs, |
const T & | rhs | ||
) | [related] |
Definition at line 316 of file ComplexNumber.cpp.
ComplexNumber<T> operator/ | ( | const T & | lhs, |
const ComplexNumber< T > & | rhs | ||
) | [related] |
Definition at line 325 of file ComplexNumber.cpp.
std::ostream& operator<< | ( | std::ostream & | out, |
const ComplexNumber< U > & | z | ||
) |
Sends a representation of this ComplexNumber into the ostream
[in] | out | The ostream reference into which the ComplexNumber will be inserted |
[in] | z | The ComplexNumber from which the data will be obtained |
Definition at line 371 of file ComplexNumber.cpp.
bool operator== | ( | const ComplexNumber< T > & | lhs, |
const ComplexNumber< U > & | rhs | ||
) | [related] |
Definition at line 339 of file ComplexNumber.cpp.
bool operator== | ( | const ComplexNumber< T > & | lhs, |
const U & | rhs | ||
) | [related] |
Definition at line 345 of file ComplexNumber.cpp.
bool operator== | ( | const T & | lhs, |
const ComplexNumber< U > & | rhs | ||
) | [related] |
Definition at line 350 of file ComplexNumber.cpp.
std::istream& operator>> | ( | std::istream & | in, |
ComplexNumber< U > & | z | ||
) |
Initializes a ComplexNumber from values extracted from the istream
[in] | in | The istream reference from which the ComplexNumber will be extracted |
[in] | z | The ComplexNumber into which the data will be inserted |
Definition at line 383 of file ComplexNumber.cpp.