Mathematics CATMathComplex

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


public class CATMathComplex

Class representing a complex number.

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


Constructor and Destructor Index


o CATMathComplex()
Constructs a complex number.
o CATMathComplex(double)
Constructs a complex number from a real and zero as imaginary part.
o CATMathComplex(double[2])
Constructs a complex number from an array of two coordinates.
o CATMathComplex(CATMathComplex&)
Copy constructor.
o CATMathComplex(double&,double&)
Constructs a complex number from two doubles, the real and the imaginary parts.

Method Index


o Conjugate()
Computes the conjugate of this complex number.
o GetCoord(double&,double&)
Retrieves the real and imaginary parts of a complex number.
o GetImag()
Returns the imaginary part of a complex number.
o GetReal()
Returns the real part of a 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(double&,double&)
Sets the real and imaginary parts of a complex number.
o SetImag(double&)
Sets the imaginary part of a complex number.
o SetReal(double&)
Sets the real part of a complex number.
o SquareModulus()
Returns the square modulus of this complex number.
o operator *(CATMathComplex&)
Multiplication operator.
o operator *=(CATMathComplex&)
Multiplication assignment operator.
o operator +(CATMathComplex&)
Addition operator.
o operator +=(CATMathComplex&)
Addition assignment operator.
o operator -(CATMathComplex&)
Subtraction operator.
o operator -=(CATMathComplex&)
Subtraction assignment operator.
o operator /(CATMathComplex&)
Division operator.
o operator /=(CATMathComplex&)
Division assignment operator.

Constructor and Destructor


o CATMathComplex
public CATMathComplex()
Constructs a complex number. The z = 0+j*0 complex number is created.
o CATMathComplex
public CATMathComplex( iReal)
Constructs a complex number from a real and zero as imaginary part.
z = iReal.
o CATMathComplex
public CATMathComplex( const iCoord)
Constructs a complex number from an array of two coordinates.
z = iCoord[0]+j*iCoord[1].
o CATMathComplex
public CATMathComplex( const iComplex)
Copy constructor.
o CATMathComplex
public CATMathComplex( const iReal,
const iImag)
Constructs a complex number from two doubles, the real and the imaginary parts. 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 a complex number.
z = ioReal+j*ioImag.
o GetImag
public GetImag()
Returns the imaginary part of a complex number.
Returns:
The imaginary part.
o GetReal
public GetReal()
Returns the real part of a complex number.
Returns:
The real part.
o Inverse
public Inverse()
Computes the inverse of this complex number.
If the norm is null, this is modified.
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 a complex number.
o SetImag
public SetImag( const iImag)
Sets the imaginary part of a complex number.
o SetReal
public SetReal( const iReal)
Sets the real part of a 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: CATMathComplex.h
If needed, your Imakefile.mk should include the module: CATMathematics

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