Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

mutk::Complex Class Reference

#include <icomplex.h>

List of all members.


Detailed Description

A class which encapsulates a complex number.

This class is used by those utility kits where complex numbers are required.


Public Member Functions

 Complex (void)
 Default Constructor.

 Complex (double r)
 Initialising constructor.

 Complex (double r, double i)
 Initialising constructor.

double abs (void)
 Returns the absolute value of the cumplex number.

double arg (void)
 Returns the argument of the complex number in the range [0, 2*PI].


Public Attributes

double real
 The data member holding the real part.

double imag
 The data member holding the imaginary part.


Friends

Complex operator+ (Complex c1, Complex c2)
 Overloaded operator + implementing the addition of two complex numbers.

Complex operator+ (Complex c, double r)
 Overloaded operator + implementing the addition of a complex number and a real number.

Complex operator+ (double r, Complex c)
 Overloaded operator + implementing the addition of a real number and a complex number.

Complex operator- (Complex c1, Complex c2)
 Overloaded operator - implementing the subtarction of a complex number by another complex number.

Complex operator- (Complex c, double r)
 Overloaded operator - implementing the subtraction of a complex number by a real number.

Complex operator- (double r, Complex c)
 Overloaded operator - implementing the subtraction of a real number by a complex number.

Complex operator * (Complex c1, Complex c2)
 Overloaded operator * implementing the multiplication of two complex numbers.

Complex operator * (Complex c, double r)
 Overloaded operator * implementing the multiplication of a complex number and a real number.

Complex operator * (double r, Complex c)
 Overloaded operator * implementing the multiplication of a real number and a complex number.

Complex operator/ (Complex c, double r)
 Overloaded operator / implementing the division of a complex number by a real number.

Complex operator/ (Complex c1, Complex c2)
 Overloaded operator / implementing the division of a complex number by another complex number.


Constructor & Destructor Documentation

mutk::Complex::Complex void   ) 
 

Default Constructor.

Initialises real and imag to zero. This class does not require any copy constructor or a destructor.

mutk::Complex::Complex double  r  ) 
 

Initialising constructor.

Initialises real to r and imag to zero.

mutk::Complex::Complex double  r,
double  i
 

Initialising constructor.

Initialises real to r and imag to i.


The documentation for this class was generated from the following file:
Generated on Mon Nov 22 11:12:42 2004 for ImprolaLib by doxygen 1.3.7