My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
cmplx Class Reference

#include <cmplx.h>

Public Member Functions

 cmplx (nr_double_t real, nr_double_t imag=0.0)
 Constructor from a real imaginary pair.
 
 cmplx ()
 Default constructor.
 
 cmplx (const cmplx &)
 Copy constructor.
 
nr_double_t arg (void)
 Compute argument of complex number.
 
nr_double_t real (void)
 Real part of complex number.
 
nr_double_t imag (void)
 Imaginary part of complex number.
 
cmplx conj (void)
 Conjugate of complex number.
 
nr_double_t abs (void)
 Compute complex modulus.
 
nr_double_t norm (void)
 Compute euclidian norm of complex number.
 
cmplxoperator= (const cmplx)
 Assign.
 
cmplxoperator= (const nr_double_t)
 Assign with real.
 
cmplxoperator+= (const cmplx)
 += operator for complex
 
cmplxoperator+= (const nr_double_t)
 += operator for real
 
cmplxoperator-= (const cmplx)
 -= operator for complex
 
cmplxoperator-= (const nr_double_t)
 -= operator for real
 
cmplxoperator*= (const cmplx)
 Multiply and assign.
 
cmplxoperator*= (const nr_double_t)
 *= operator for complex
 
cmplxoperator/= (const cmplx)
 Divide and assign.
 
cmplxoperator/= (const nr_double_t)
 /= operator for complex
 
cmplx operator+ ()
 Unary +.
 
cmplx operator- ()
 Unary -.
 
void print (void)
 

Friends

nr_double_t arg (const cmplx)
 Compute argument of complex number.
 
nr_double_t real (const cmplx)
 Real part of complex number.
 
nr_double_t imag (const cmplx)
 Imaginary part of complex number.
 
cmplx conj (const cmplx)
 Conjugate of complex number.
 
nr_double_t abs (const cmplx)
 Compute complex modulus.
 
cmplx operator+ (const cmplx, const cmplx)
 Addition of two complex.
 
cmplx operator+ (const cmplx, const nr_double_t)
 Addition of complex and real.
 
cmplx operator+ (const nr_double_t, const cmplx)
 Addition of real and complex.
 
cmplx operator- (const cmplx, const cmplx)
 Substraction of two complex.
 
cmplx operator- (const cmplx, const nr_double_t)
 Substraction of complex and real.
 
cmplx operator- (const nr_double_t, const cmplx)
 Substraction of real and complex.
 
cmplx operator* (const cmplx, const cmplx)
 Multiplication of two complex.
 
cmplx operator* (const cmplx, const nr_double_t)
 Multiplication of complex and real.
 
cmplx operator* (const nr_double_t, const cmplx)
 Multiplication of real and complex.
 
cmplx operator/ (const cmplx, const cmplx)
 Divide a complex by a complex.
 
cmplx operator/ (const cmplx, const nr_double_t)
 Divide a complex by a double.
 
cmplx operator/ (const nr_double_t, const cmplx)
 Divide a real by a complex.
 

Detailed Description

Definition at line 36 of file cmplx.h.

Constructor & Destructor Documentation

cmplx::cmplx ( nr_double_t  real,
nr_double_t  imag = 0.0 
)

Constructor from a real imaginary pair.

Construct a complex from a real part and an imaginary part

Todo:
Why not inline

Definition at line 45 of file cmplx.cpp.

Here is the call graph for this function:

cmplx::cmplx ( )

Default constructor.

Initialize the complex number to $0 + 0 i$

Todo:
Why not inline

Definition at line 55 of file cmplx.cpp.

Here is the caller graph for this function:

cmplx::cmplx ( const cmplx z)

Copy constructor.

Todo:
Why not inline

Definition at line 63 of file cmplx.cpp.

Member Function Documentation

nr_double_t cmplx::abs ( void  )

Compute complex modulus.

Returns
modulus of complex object
Todo:
Why not inline

Definition at line 73 of file cmplx.cpp.

Here is the call graph for this function:

nr_double_t cmplx::arg ( void  )

Compute argument of complex number.

Returns
Argument of z
Todo:
Why not inline

Definition at line 102 of file cmplx.cpp.

Here is the call graph for this function:

cmplx cmplx::conj ( void  )

Conjugate of complex number.

Returns
Conjugate of complex object
Todo:

Why not inline?

Why not operator ~

Definition at line 161 of file cmplx.cpp.

Here is the call graph for this function:

nr_double_t cmplx::imag ( void  )

Imaginary part of complex number.

Returns
Imaginary part of complex object
Todo:
Why not inline?

Definition at line 141 of file cmplx.cpp.

Here is the caller graph for this function:

nr_double_t cmplx::norm ( void  )

Compute euclidian norm of complex number.

Compute $(\Re\mathrm{e}\;z )^2+ (\Im\mathrm{m}\;z)^2=|z|^2$

Returns
Euclidian norm of z
Todo:
Why not inline

Definition at line 93 of file cmplx.cpp.

Here is the caller graph for this function:

cmplx & cmplx::operator*= ( const cmplx  z)

Multiply and assign.

Todo:
Put near other *=

Definition at line 416 of file cmplx.cpp.

cmplx & cmplx::operator*= ( const nr_double_t  r2)

*= operator for complex

Todo:

Why not inline

Add for real

Definition at line 227 of file cmplx.cpp.

cmplx cmplx::operator+ ( )

Unary +.

Todo:
Why not inline

Definition at line 178 of file cmplx.cpp.

Here is the call graph for this function:

cmplx & cmplx::operator+= ( const cmplx  z2)

+= operator for complex

Todo:
Why not inline

Definition at line 192 of file cmplx.cpp.

cmplx & cmplx::operator+= ( const nr_double_t  r2)

+= operator for real

Todo:
Why not inline

Definition at line 201 of file cmplx.cpp.

cmplx cmplx::operator- ( )

Unary -.

Todo:
Why not inline

Definition at line 185 of file cmplx.cpp.

Here is the call graph for this function:

cmplx & cmplx::operator-= ( const cmplx  z2)

-= operator for complex

Todo:
Why not inline

Definition at line 209 of file cmplx.cpp.

cmplx & cmplx::operator-= ( const nr_double_t  r2)

-= operator for real

Todo:
Why not inline

Definition at line 218 of file cmplx.cpp.

cmplx & cmplx::operator/= ( const cmplx  z)

Divide and assign.

Todo:
Put near *=

Definition at line 343 of file cmplx.cpp.

Here is the call graph for this function:

cmplx & cmplx::operator/= ( const nr_double_t  r2)

/= operator for complex

Todo:

Why not inline

Add for real

Definition at line 237 of file cmplx.cpp.

cmplx & cmplx::operator= ( const cmplx  z)

Assign.

Todo:
Why not inline

Definition at line 398 of file cmplx.cpp.

cmplx & cmplx::operator= ( const nr_double_t  x)

Assign with real.

Todo:
Why not inline

Definition at line 407 of file cmplx.cpp.

void cmplx::print ( void  )
nr_double_t cmplx::real ( void  )

Real part of complex number.

Returns
Real part
Todo:
Why not inline?

Definition at line 122 of file cmplx.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

nr_double_t abs ( const cmplx  z)
friend

Compute complex modulus.

Parameters
[in]zComplex number
Returns
Modulus of z
Todo:
Why not inline

Definition at line 83 of file cmplx.cpp.

nr_double_t arg ( const cmplx  z)
friend

Compute argument of complex number.

Parameters
[in]zComplex number
Returns
Argument of z
Todo:

lack of nr_double_t cmplx::arg(void)

Why not inline

Definition at line 113 of file cmplx.cpp.

cmplx conj ( const cmplx  z)
friend

Conjugate of complex number.

Parameters
[in]zComplex number
Returns
Conjugate of complex z
Todo:
Why not inline?

Definition at line 171 of file cmplx.cpp.

nr_double_t imag ( const cmplx  z)
friend

Imaginary part of complex number.

Parameters
[in]zComplex number
Returns
Imaginary part of z
Todo:
Why not inline?

Definition at line 151 of file cmplx.cpp.

cmplx operator* ( const cmplx  z1,
const cmplx  z2 
)
friend

Multiplication of two complex.

Todo:
Why not inline

Definition at line 302 of file cmplx.cpp.

cmplx operator* ( const cmplx  z1,
const nr_double_t  r2 
)
friend

Multiplication of complex and real.

Todo:
Why not inline

Definition at line 288 of file cmplx.cpp.

cmplx operator* ( const nr_double_t  r1,
const cmplx  z2 
)
friend

Multiplication of real and complex.

Todo:
Why not inline

Definition at line 295 of file cmplx.cpp.

cmplx operator+ ( const cmplx  z1,
const cmplx  z2 
)
friend

Addition of two complex.

Todo:
Why not inline

Definition at line 246 of file cmplx.cpp.

cmplx operator+ ( const cmplx  z1,
const nr_double_t  r2 
)
friend

Addition of complex and real.

Todo:
Why not inline

Definition at line 260 of file cmplx.cpp.

cmplx operator+ ( const nr_double_t  r1,
const cmplx  z2 
)
friend

Addition of real and complex.

Todo:
Why not inline

Definition at line 253 of file cmplx.cpp.

cmplx operator- ( const cmplx  z1,
const cmplx  z2 
)
friend

Substraction of two complex.

Todo:
Why not inline

Definition at line 267 of file cmplx.cpp.

cmplx operator- ( const cmplx  z1,
const nr_double_t  r2 
)
friend

Substraction of complex and real.

Todo:
Why not inline

Definition at line 281 of file cmplx.cpp.

cmplx operator- ( const nr_double_t  r1,
const cmplx  z2 
)
friend

Substraction of real and complex.

Todo:
Why not inline

Definition at line 274 of file cmplx.cpp.

cmplx operator/ ( const cmplx  z1,
const cmplx  z2 
)
friend

Divide a complex by a complex.

Todo:
Put near *

Definition at line 317 of file cmplx.cpp.

cmplx operator/ ( const cmplx  z1,
const nr_double_t  r2 
)
friend

Divide a complex by a double.

Todo:

why not inline

Put near *

Definition at line 310 of file cmplx.cpp.

cmplx operator/ ( const nr_double_t  r1,
const cmplx  z2 
)
friend

Divide a real by a complex.

Todo:
Put near *

Definition at line 373 of file cmplx.cpp.

nr_double_t real ( const cmplx  z)
friend

Real part of complex number.

Parameters
[in]zComplex number
Returns
Real part of z
Todo:
Why not inline?

Definition at line 132 of file cmplx.cpp.


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