My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
cmplx.cpp File Reference
#include <math.h>
#include "real.h"
#include "cmplx.h"
Include dependency graph for cmplx.cpp:

Go to the source code of this file.

Functions

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

Detailed Description

Implement complex number class and functions

Definition in file cmplx.cpp.

Function Documentation

nr_double_t abs ( const cmplx  z)

Compute complex modulus.

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

Definition at line 83 of file cmplx.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nr_double_t arg ( const cmplx  z)

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.

Here is the call graph for this function:

cmplx conj ( const cmplx  z)

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.

Here is the caller graph for this function:

nr_double_t imag ( const cmplx  z)

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.

Here is the caller graph for this function:

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

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 
)

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 
)

Multiplication of two complex.

Todo:
Why not inline

Definition at line 302 of file cmplx.cpp.

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

Addition of two complex.

Todo:
Why not inline

Definition at line 246 of file cmplx.cpp.

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

Addition of real and complex.

Todo:
Why not inline

Definition at line 253 of file cmplx.cpp.

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

Addition of complex and real.

Todo:
Why not inline

Definition at line 260 of file cmplx.cpp.

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

Substraction of two complex.

Todo:
Why not inline

Definition at line 267 of file cmplx.cpp.

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

Substraction of real and complex.

Todo:
Why not inline

Definition at line 274 of file cmplx.cpp.

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

Substraction of complex and real.

Todo:
Why not inline

Definition at line 281 of file cmplx.cpp.

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

Divide a complex by a double.

Todo:

why not inline

Put near *

Definition at line 310 of file cmplx.cpp.

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

Divide a complex by a complex.

Todo:
Put near *

Definition at line 317 of file cmplx.cpp.

Here is the call graph for this function:

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

Divide a real by a complex.

Todo:
Put near *

Definition at line 373 of file cmplx.cpp.

Here is the call graph for this function:

nr_double_t real ( const cmplx  z)

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.