Woolz Image Processing  Version 1.8.3
AlgComplex

Files

file  AlgComplexUtils.c
 Provides basic complex number utilities.
 

Functions

double AlgCModSq (ComplexD z)
 Computes the square of the modulus of the given complex value. More...
 
double AlgCMod (ComplexD z)
 Computes the modulus of the given complex value. More...
 
double AlgCArg (ComplexD z)
 Computes the argument of the given complex value. More...
 
double AlgCRe (ComplexD z)
 Returns the real component of the given complex value. More...
 
double AlgCIm (ComplexD z)
 Returns the imaginary component of the given complex value. More...
 
ComplexD AlgCConj (ComplexD z)
 Returns the complex conjugate of the given complex value. More...
 
ComplexD AlgCAdd (ComplexD z1, ComplexD z2)
 Computes the sum of the two given complex values. More...
 
ComplexD AlgCSub (ComplexD z1, ComplexD z2)
 Subtracts the second complex value from the first. More...
 
ComplexD AlgCMult (ComplexD z1, ComplexD z2)
 Multiplies the second complex value with the first. More...
 
ComplexD AlgCDiv (ComplexD z1, ComplexD z2)
 Divides the first complex value by the second. More...
 
ComplexD AlgCPow (ComplexD z, double y)
 Pomputes the value of the given complex value to the power of the given real value. More...
 

Detailed Description

Function Documentation

◆ AlgCModSq()

double AlgCModSq ( ComplexD  z)

Computes the square of the modulus of the given complex value.

Returns
Square of modulus.
Parameters
zGiven complex value.

References _ComplexD::im, and _ComplexD::re.

Referenced by AlgCDiv().

◆ AlgCMod()

double AlgCMod ( ComplexD  z)

Computes the modulus of the given complex value.

Returns
Modulus.
Parameters
zGiven complex value.

References _ComplexD::im, and _ComplexD::re.

Referenced by AlgCPow().

◆ AlgCArg()

double AlgCArg ( ComplexD  z)

Computes the argument of the given complex value.

Returns
Argument.
Parameters
zGiven complex value.

References _ComplexD::im, and _ComplexD::re.

Referenced by AlgCPow().

◆ AlgCRe()

double AlgCRe ( ComplexD  z)

Returns the real component of the given complex value.

Returns
Real component.
Parameters
zGiven complex value.

References _ComplexD::re.

◆ AlgCIm()

double AlgCIm ( ComplexD  z)

Returns the imaginary component of the given complex value.

Returns
Imaginary component.
Parameters
zGiven complex value.

References _ComplexD::im.

◆ AlgCConj()

ComplexD AlgCConj ( ComplexD  z)

Returns the complex conjugate of the given complex value.

Returns
Complex conjugate.
Parameters
zGiven complex value.

References _ComplexD::im, and _ComplexD::re.

Referenced by AlgCDiv().

◆ AlgCAdd()

ComplexD AlgCAdd ( ComplexD  z1,
ComplexD  z2 
)

Computes the sum of the two given complex values.

Returns
Sum.
Parameters
z1First complex value.
z2Second complex value.

References _ComplexD::im, and _ComplexD::re.

◆ AlgCSub()

ComplexD AlgCSub ( ComplexD  z1,
ComplexD  z2 
)

Subtracts the second complex value from the first.

Returns
Difference.
Parameters
z1First complex value.
z2Second complex value.

References _ComplexD::im, and _ComplexD::re.

◆ AlgCMult()

ComplexD AlgCMult ( ComplexD  z1,
ComplexD  z2 
)

Multiplies the second complex value with the first.

Returns
Product.
Parameters
z1First complex value.
z2Second complex value.

References _ComplexD::im, and _ComplexD::re.

Referenced by AlgCDiv(), WlzBasisFnConf2DFromCPts(), and WlzBasisFnValueConf2D().

◆ AlgCDiv()

ComplexD AlgCDiv ( ComplexD  z1,
ComplexD  z2 
)

Divides the first complex value by the second.

Returns
Ratio.
Parameters
z1First complex value.
z2Second complex value.

References AlgCConj(), AlgCModSq(), AlgCMult(), _ComplexD::im, and _ComplexD::re.

◆ AlgCPow()

ComplexD AlgCPow ( ComplexD  z,
double  y 
)

Pomputes the value of the given complex value to the power of the given real value.

Returns
Power.
Parameters
zGiven complex value.
yGiven real value.

References AlgCArg(), AlgCMod(), _ComplexD::im, and _ComplexD::re.