Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ComplexNumber Class Reference

Stores a complex number z = x + iy where 'x' is the real component and 'y' is the imaginary component. More...

#include <ComplexNumber.h>

List of all members.

Public Methods

 ComplexNumber (void)
 ComplexNumber (double x, double y)
const double & x (void) const
const double & y (void) const
double & x (void)
double & y (void)
double inq_magnitude2 (void) const
ComplexNumber inq_square (void) const
ComplexNumber inq_cube (void) const
ComplexNumber inq_inverse (void) const
const ComplexNumber & operator+= (const ComplexNumber &)
 Adds the given ComplexNumber to this one.

const ComplexNumber & operator-= (const ComplexNumber &)
 Subtracts the given ComplexNumber to this one.

ComplexNumber operator+ (const ComplexNumber &) const
ComplexNumber operator- (const ComplexNumber &) const
ComplexNumber operator * (const ComplexNumber &) const

Private Attributes

double m_x
 Real component.

double m_y
 Imaginary component.


Detailed Description

Stores a complex number z = x + iy where 'x' is the real component and 'y' is the imaginary component.

Provides various mathematical operations for complex numbers.


Constructor & Destructor Documentation

ComplexNumber::ComplexNumber void    [inline]
 

ComplexNumber::ComplexNumber double    x,
double    y
[inline]
 


Member Function Documentation

ComplexNumber ComplexNumber::inq_cube void    const [inline]
 

Returns:
Returns the cube of this ComplexNumber.

ComplexNumber ComplexNumber::inq_inverse void    const [inline]
 

Returns:
Returns the recipricol of this ComplexNumber.

double ComplexNumber::inq_magnitude2 void    const [inline]
 

Returns:
Returns the square of the magnitude of this ComplexNumber.

ComplexNumber ComplexNumber::inq_square void    const [inline]
 

Returns:
Returns the square of this ComplexNumber.

ComplexNumber ComplexNumber::operator * const ComplexNumber &    z const [inline]
 

Returns:
Returns the product of this ComplexNumber and the given one.

ComplexNumber ComplexNumber::operator+ const ComplexNumber &    z const [inline]
 

Returns:
Returns the sum of this ComplexNumber and the given one.

const ComplexNumber & ComplexNumber::operator+= const ComplexNumber &    z [inline]
 

Adds the given ComplexNumber to this one.

ComplexNumber ComplexNumber::operator- const ComplexNumber &    z const [inline]
 

Returns:
Returns the difference between this ComplexNumber and the given one.

const ComplexNumber & ComplexNumber::operator-= const ComplexNumber &    z [inline]
 

Subtracts the given ComplexNumber to this one.

double& ComplexNumber::x void    [inline]
 

const double& ComplexNumber::x void    const [inline]
 

double& ComplexNumber::y void    [inline]
 

const double& ComplexNumber::y void    const [inline]
 


Member Data Documentation

double ComplexNumber::m_x [private]
 

Real component.

double ComplexNumber::m_y [private]
 

Imaginary component.


The documentation for this class was generated from the following file:
Generated on Sun Jul 21 11:52:17 2002 for FractalViewer by doxygen1.2.16