previous next Up Title Contents

UtCmplxM Module


The Complex Data Structure

typedef struct {






double
re, im;



} Complex, *ComplexPtr;


The Add_CmplxM(...) Routine

Syntax
void Add_CmplxM(ComplexPtr a, ComplexPtr b, ComplexPtr c);


Description
Complex addition c = a + b.


Returns
none.


Example(s)
InitCoeffs_Filters_GammaTone(...) routine.

The Convert_CmplxM(...) Routine

Syntax
void Convert_CmplxM(ComplexPtr a, ComplexPtr b);


Description
Converts complex a. in form x + iy to b in the form |a|*exp(i * theta).


Returns
none.


Example(s)

The Copy_CmplxM(...) Routine

Syntax
void Copy_CmplxM(ComplexPtr a,ComplexPtr b);


Description
Copy contents of a to b.


Returns
none.


Example(s)

The Div_CmplxM(...) Routine

Syntax
int Div_CmplxM(ComplexPtr a, ComplexPtr b, ComplexPtr c);


Description
Complex divide c = a / b.


Returns
TRUE if the denominator is non-zero, or it will return FALSE.


Example(s)
InitCoeffs_Filters_GammaTone(...) routine.

The Init_CmplxM(...) Routine

Syntax
ComplexPtr Init_CmplxM(double realValue, double imagValue);


Description
This routine allocates and sets a complex data type with realValue and imagValue.


Returns
a pointer to the Complex data structure or NULL if it fails.


Example(s)

The Mult_CmplxM(...) Routine

Syntax
void Mult_CmplxM(ComplexPtr a, ComplexPtr b, ComplexPtr c);


Description
Complex multiply c = a * b.


Returns
none.


Example(s)
InitCoeffs_Filters_GammaTone(...) routine.

The Power_CmplxM(...) Routine

Syntax
void Power_CmplxM(ComplexPtr a, double n);


Description
This routine calculates a to the power of n, where n is fractional.


Returns
none.


Example(s)

The Subt_CmplxM(...) Routine

Syntax
void Subt_CmplxM(ComplexPtr a, ComplexPtr b, ComplexPtr c);


Description
Complex subtraction c = a - b.


Returns
none.


Example(s)


previous next Up Title Contents