All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Mathematics Class CATMathComplex

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(CATMathComplex&)
Copy constructor.
o CATMathComplex(double&,double&)
Constructs a complex number from two doubles, the real and the imaginary parts.
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.

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( const CATMathComplex& iComplex)
Copy constructor.
o CATMathComplex
public INLINE CATMathComplex( const double& iReal,
const double& 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.
o CATMathComplex
public CATMathComplex(double iReal)
Constructs a complex number from a real and zero as imaginary part.
z = iReal.
o CATMathComplex
public CATMathComplex( const double[2] iCoord)
Constructs a complex number from an array of two coordinates.
z = iCoord[0]+j*iCoord[1].

Methods


o Conjugate
public INLINE void Conjugate()
Computes the conjugate of this complex number.
o GetCoord
public INLINE void GetCoord(double& ioReal,
double& ioImag) const
Retrieves the real and imaginary parts of a complex number.
z = ioReal+j*ioImag.
o GetImag
public INLINE double GetImag()const
Returns the imaginary part of a complex number.
Returns:
The imaginary part.
o GetReal
public INLINE double GetReal()const
Returns the real part of a complex number.
Returns:
The real part.
o Inverse
public void Inverse()
Computes the inverse of this complex number.
If the norm is null, this is modified.
o Modulus
public double Modulus()const
Returns the modulus of this complex number.
Returns:
sqrt(iReal^2 + iImag^2).
o Normalize
public void Normalize()
Normalizes this complex number.
o SetCoord
public INLINE void SetCoord( const double& iReal,
const double& iImag)
Sets the real and imaginary parts of a complex number.
o SetImag
public INLINE void SetImag( const double& iImag)
Sets the imaginary part of a complex number.
o SetReal
public INLINE void SetReal( const double& iReal)
Sets the real part of a complex number.
o SquareModulus
public double SquareModulus()const
Returns the square modulus of this complex number.
Returns:
iReal^2 + iImag^2.
o operator *
public CATMathComplex operator *( const CATMathComplex& iComp2) const
Multiplication operator.
o operator *=
public CATMathComplex& operator *=( const CATMathComplex& iComp)
Multiplication assignment operator.
The operator modifies this complex number.
o operator +
public CATMathComplex operator +( const CATMathComplex& iComp2) const
Addition operator.
o operator +=
public CATMathComplex & operator +=( const CATMathComplex& iComp)
Addition assignment operator.
The operator modifies this complex number.
o operator -
public CATMathComplex operator -( const CATMathComplex& iComp2) const
Subtraction operator.
o operator -=
public CATMathComplex & operator -=( const CATMathComplex& iComp)
Subtraction assignment operator.
The operator modifies this complex number.
o operator /
public CATMathComplex operator /( const CATMathComplex& iComp2) const
Division operator.
o operator /=
public CATMathComplex & operator /=( const CATMathComplex& 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 © 2003, Dassault Systèmes. All rights reserved.