HologramDepthmap Library
Public Member Functions | Public Attributes | Friends | List of all members
Complex Class Reference

class for the complex number and its arithmetic. More...

#include <complex.h>

Public Member Functions

 Complex ()
 
 Complex (double ta, double tb)
 
 Complex (const Complex &p)
 
double mag2 () const
 
double mag () const
 
double arg () const
 
void euler (double &r, double &theta)
 
Complex conj () const
 
const Complexoperator= (const Complex &p)
 
const Complexoperator+= (const Complex &p)
 
const Complexoperator-= (const Complex &p)
 
const Complexoperator*= (const double k)
 
const Complexoperator*= (const Complex &p)
 
const Complexoperator/= (const double k)
 

Public Attributes

double a
 
double b
 

Friends

const Complex operator+ (const Complex &p, const Complex &q)
 
const Complex operator- (const Complex &p, const Complex &q)
 
const Complex operator* (const double k, const Complex &p)
 
const Complex operator* (const Complex &p, const double k)
 
const Complex operator* (const Complex &p, const Complex &q)
 
const Complex operator/ (const Complex &p, const Complex &q)
 
std::ostream & operator<< (std::ostream &os, const Complex &p)
 

Detailed Description

Definition at line 22 of file complex.h.

Constructor & Destructor Documentation

◆ Complex() [1/3]

Complex::Complex ( )
inline

Definition at line 25 of file complex.h.

◆ Complex() [2/3]

Complex::Complex ( double  ta,
double  tb 
)
inline

Definition at line 26 of file complex.h.

◆ Complex() [3/3]

Complex::Complex ( const Complex p)
inline

Definition at line 27 of file complex.h.

Member Function Documentation

◆ arg()

double Complex::arg ( ) const
inline

Definition at line 36 of file complex.h.

◆ conj()

Complex Complex::conj ( ) const
inline

Definition at line 53 of file complex.h.

◆ euler()

void Complex::euler ( double &  r,
double &  theta 
)
inline

Definition at line 47 of file complex.h.

◆ mag()

double Complex::mag ( ) const
inline

Definition at line 34 of file complex.h.

◆ mag2()

double Complex::mag2 ( ) const
inline

Definition at line 33 of file complex.h.

◆ operator*=() [1/2]

const Complex& Complex::operator*= ( const double  k)
inline

Definition at line 80 of file complex.h.

◆ operator*=() [2/2]

const Complex& Complex::operator*= ( const Complex p)
inline

Definition at line 88 of file complex.h.

◆ operator+=()

const Complex& Complex::operator+= ( const Complex p)
inline

Definition at line 64 of file complex.h.

◆ operator-=()

const Complex& Complex::operator-= ( const Complex p)
inline

Definition at line 72 of file complex.h.

◆ operator/=()

const Complex& Complex::operator/= ( const double  k)
inline

Definition at line 99 of file complex.h.

◆ operator=()

const Complex& Complex::operator= ( const Complex p)
inline

Definition at line 56 of file complex.h.

Friends And Related Function Documentation

◆ operator* [1/3]

const Complex operator* ( const double  k,
const Complex p 
)
friend

Definition at line 117 of file complex.h.

◆ operator* [2/3]

const Complex operator* ( const Complex p,
const double  k 
)
friend

Definition at line 122 of file complex.h.

◆ operator* [3/3]

const Complex operator* ( const Complex p,
const Complex q 
)
friend

Definition at line 127 of file complex.h.

◆ operator+

const Complex operator+ ( const Complex p,
const Complex q 
)
friend

Definition at line 107 of file complex.h.

◆ operator-

const Complex operator- ( const Complex p,
const Complex q 
)
friend

Definition at line 112 of file complex.h.

◆ operator/

const Complex operator/ ( const Complex p,
const Complex q 
)
friend

Definition at line 132 of file complex.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Complex p 
)
friend

Definition at line 138 of file complex.h.

Member Data Documentation

◆ a

double Complex::a

Definition at line 145 of file complex.h.

◆ b

double Complex::b

Definition at line 145 of file complex.h.


The documentation for this class was generated from the following file: