xcomplex.h File Reference
#include <math.h>
Include dependency graph for xcomplex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  cmplx< T >
 

Typedefs

typedef cmplx< double > cdouble
 
typedef cmplx< float > cfloat
 

Functions

template<class Ta , class Tb >
cmplx< Ta > operator+ (const cmplx< Ta > &a, const cmplx< Tb > &b)
 
template<class Ta , class Tb >
cmplx< Ta > operator+ (const cmplx< Ta > &a, Tb &b)
 
template<class T >
cmplx< T > operator+ (T a, const cmplx< T > &b)
 
template<class Ta , class Tb >
cmplx< Ta > operator- (const cmplx< Ta > &a, const cmplx< Tb > &b)
 
template<class Ta , class Tb >
cmplx< Ta > operator- (const cmplx< Ta > &a, Tb &b)
 
template<class T >
cmplx< T > operator- (T a, const cmplx< T > &b)
 
template<class Ta , class Tb >
cmplx< Ta > operator* (const cmplx< Ta > &a, const cmplx< Tb > &b)
 
template<class Ta , class Tb >
cmplx< Ta > operator* (const cmplx< Ta > &a, Tb &b)
 
template<class T >
cmplx< T > operator* (T &a, const cmplx< T > &b)
 
template<class Ta , class Tb >
cmplx< Ta > operator/ (const cmplx< Ta > &a, const cmplx< Tb > &b)
 
template<class Ta , class Tb >
cmplx< Ta > operator/ (const cmplx< Ta > &a, Tb &b)
 
template<class T >
cmplx< T > operator/ (T a, const cmplx< T > &b)
 
template<class T >
cmplx< T > operator+ (const cmplx< T > &a)
 
template<class T >
cmplx< T > operator- (const cmplx< T > &a)
 
template<class Ta , class Tb >
bool operator== (const cmplx< Ta > &a, const cmplx< Tb > &b)
 
template<class Ta , class Tb >
bool operator== (const cmplx< Ta > &a, Tb b)
 
template<class Ta , class Tb >
bool operator== (Ta a, const cmplx< Tb > &b)
 
template<class Ta , class Tb >
bool operator!= (const cmplx< Ta > &a, const cmplx< Tb > &b)
 
template<class Ta , class Tb >
bool operator!= (const cmplx< Ta > &a, Tb b)
 
template<class Ta , class Tb >
bool operator!= (Ta a, const cmplx< Tb > &b)
 
template<class T >
real (const cmplx< T > &a)
 
template<class T >
imag (const cmplx< T > &a)
 
template<class T >
abs (const cmplx< T > &a)
 
template<class T >
fabs (const cmplx< T > &a)
 
template<class T >
arg (const cmplx< T > &a)
 
template<class T >
norm (const cmplx< T > &a)
 
template<class T >
cmplx< T > conj (const cmplx< T > &a)
 
template<class T >
cmplx< T > polar (const T &r, const T &theta)
 
template<class T >
cmplx< T > exp (const cmplx< T > &a)
 
template<class T >
cmplx< T > log (const cmplx< T > &a)
 
template<class T >
cmplx< T > pow (const cmplx< T > &a, T &e)
 
template<class T >
cmplx< T > sqrt (const cmplx< T > &a)
 
template<class T >
cmplx< T > operator^ (const cmplx< T > &a, const cmplx< T > &b)
 

Detailed Description

  • Xue's complex number class.

This classes is modelled after standard c++ complex class, with a few additional methods. Unused standard member and non-member functions/operators may not have been implemented.