Mathematics CATMathComplexf

Usage: you must use this class as is. You should never derive it.


public class CATMathComplexf

Class representing a complex number in float.

z = iReal+j*iImag with j*j = -1.


Constructor and Destructor Index


o CATMathComplexf()
Construct the z = 0+j*0 complex number.
o CATMathComplexf(float)
Constructs a complex number from iReal and Imag=0.
o CATMathComplexf(float[2])
Constructs a complex number from an array of two coordinates.
o CATMathComplexf(CATMathComplexf&)
Copy constructor.
o CATMathComplexf(float&,float&)
Constructs a complex number from iReal and iImag.

Method Index


o Conjugate()
Computes the conjugate of this complex number.
o GetCoord(float&,float&)
Retrieves the real and imaginary parts of this complex number.
o GetImag()
Returns the imaginary part of this complex number.
o GetReal()
Returns the real part of this complex number.
o Inverse()
Computes the inverse of this complex number.
o Modulus()
Returns the modulus of this complex number.
o Normalize()
Normalizes this complex number.
o SetCoord(float&,float&)
Sets the real and imaginary parts of this complex number.
o SetImag(float&)
Sets the imaginary part of this complex number.
o SetReal(float&)
Sets the real part of this complex number.
o SquareModulus()
Returns the square modulus of this complex number.
o operator *(CATMathComplexf&)
Multiplication operator.
o operator *=(CATMathComplexf&)
Multiplication assignment operator.
o operator +(CATMathComplexf&)
Addition operator.
o operator +=(CATMathComplexf&)
Addition assignment operator.
o operator -(CATMathComplexf&)
Subtraction operator.
o operator -=(CATMathComplexf&)
Subtraction assignment operator.
o operator /(CATMathComplexf&)
Division operator.
o operator /=(CATMathComplexf&)
Division assignment operator.

Constructor and Destructor


o CATMathComplexf
public CATMathComplexf()
Construct the z = 0+j*0 complex number.
o CATMathComplexf
public CATMathComplexf( iReal)
Constructs a complex number from iReal and Imag=0.
z = iReal.
o CATMathComplexf
public CATMathComplexf( const iCoord)
Constructs a complex number from an array of two coordinates.
z = iCoord[0]+j*iCoord[1].
o CATMathComplexf
public CATMathComplexf( const iComplex)
Copy constructor.
o CATMathComplexf
public CATMathComplexf( const iReal,
const iImag)
Constructs a complex number from iReal and iImag.
z = iReal+j*iImag.

Methods


o Conjugate
public Conjugate()
Computes the conjugate of this complex number.
o GetCoord
public GetCoord( ioReal,
ioImag)
Retrieves the real and imaginary parts of this complex number.
z = ioReal+j*ioImag.
o GetImag
public GetImag()
Returns the imaginary part of this complex number.
Returns:
The imaginary part.
o GetReal
public GetReal()
Returns the real part of this complex number.
Returns:
The real part.
o Inverse
public Inverse()
Computes the inverse of this complex number.
If the norm is null, this is set to null.
o Modulus
public Modulus()
Returns the modulus of this complex number.
Returns:
sqrt(iReal^2 + iImag^2).
o Normalize
public Normalize()
Normalizes this complex number.
o SetCoord
public SetCoord( const iReal,
const iImag)
Sets the real and imaginary parts of this complex number.
o SetImag
public SetImag( const iImag)
Sets the imaginary part of this complex number.
o SetReal
public SetReal( const iReal)
Sets the real part of this complex number.
o SquareModulus
public SquareModulus()
Returns the square modulus of this complex number.
Returns:
iReal^2 + iImag^2.
o operator *
public operator *( const iComp2)
Multiplication operator.
o operator *=
public operator *=( const iComp)
Multiplication assignment operator.
The operator modifies this complex number.
o operator +
public operator +( const iComp2)
Addition operator.
o operator +=
public operator +=( const iComp)
Addition assignment operator.
The operator modifies this complex number.
o operator -
public operator -( const iComp2)
Subtraction operator.
o operator -=
public operator -=( const iComp)
Subtraction assignment operator.
The operator modifies this complex number.
o operator /
public operator /( const iComp2)
Division operator.
o operator /=
public operator /=( const iComp)
Division assignment operator.
The operator modifies this complex number.

This object is included in the file: CATMathComplexf.h
If needed, your Imakefile.mk should include the module: CATMathematics

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.