Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

JComplex Class Reference

#include <Complex.hpp>

List of all members.

Public Methods

 JComplex (const CplxDouble Real)
 JComplex (const CplxDouble Real, const CplxDouble Imag)
 JComplex (const JComplex &c)
virtual ~JComplex ()
BOOL Compare (const JComplex &c) const
BOOL operator== (const JComplex &c) const
BOOL operator!= (const JComplex &c) const
BOOL Compare (const CplxDouble r) const
BOOL operator== (const CplxDouble r) const
BOOL operator!= (const CplxDouble r) const
BOOL Compare (const JComplex &left, const JComplex &right)
JComplex & operator= (const JComplex &c)
JComplex & operator= (const CplxDouble &x)
JComplex operator+ (const CplxDouble x, const JComplex &right)
JComplex operator- (const CplxDouble x, const JComplex &right)
JComplex operator+ (const JComplex &left, const CplxDouble x)
JComplex operator- (const JComplex &left, const CplxDouble x)
JComplex & operator+= (const JComplex &c)
JComplex & operator-= (const JComplex &c)
JComplex & operator+= (const CplxDouble x)
JComplex & operator-= (const CplxDouble x)

Friends

BOOL operator== (const JComplex &left, const JComplex &right)
BOOL operator!= (const JComplex &left, const JComplex &right)
BOOL Compare (const JComplex &l, const CplxDouble x)
BOOL operator== (const JComplex &left, const CplxDouble x)
BOOL operator!= (const JComplex &left, const CplxDouble x)
BOOL operator== (const CplxDouble x, const JComplex &right)
BOOL operator!= (const CplxDouble x, const JComplex &right)
JComplex operator+ (const JComplex &left, const JComplex &right)
JComplex operator- (const JComplex &left, const JComplex &right)


Constructor & Destructor Documentation

JComplex::JComplex const CplxDouble    r [inline]
 

Constructors and Destructors ///////////////////////////////////////////////////////////////////////////// Defined in: CpxBuild.cpp /////////////////////////////////////////////////////////////////////////////.

Definition at line 10 of file CpxBuild.cpp.

Referenced by CplxNumber(), operator+(), and operator-().

00011   : Real( r ), Imag( 0.0 ) { }

JComplex::JComplex const CplxDouble    r,
const CplxDouble    i
[inline]
 

Constructors and Destructors /////////////////////////////////////////////////////////////////////////////.

Definition at line 7 of file CpxBuild.cpp.

00008   : Real( r ), Imag( i ) { }

JComplex::JComplex const JComplex &    c [inline]
 

Definition at line 13 of file CpxBuild.cpp.

00014   : Real( c.Real ), Imag( c.Imag ) { }

JComplex::~JComplex   [inline, virtual]
 

Definition at line 16 of file CpxBuild.cpp.

Referenced by CplxNumber().

00016 { }


Member Function Documentation

BOOL JComplex::Compare const JComplex &    l,
const JComplex &    r
 

Compare Left Complex with Right Complex (Friend functions) /////////////////////////////////////////////////////////////////////////////.

Definition at line 38 of file CplxComp.cpp.

00038                                                              {
00039   return ( (l.Real == r.Real) && (l.Imag == r.Imag) );
00040 }                                                                        

BOOL JComplex::Compare const CplxDouble    r const
 

Compare 'THIS' with a CplxDouble /// True, if Real only and equal /////////////////////////////////////////////////////////////////////////////.

Definition at line 23 of file CplxComp.cpp.

00023                                                  {
00024   return ( (Real == r)  &&  (Imag == 0) );
00025 }

BOOL JComplex::Compare const JComplex &    c const
 

Compare 'THIS' with a Complex ///////////////////////////////////////////////////////////////////////////// Defined in: CplxComp.cpp /////////////////////////////////////////////////////////////////////////////.

Definition at line 7 of file CplxComp.cpp.

Referenced by CplxNumber(), operator!=(), and operator==().

00007                                                 {
00008   if (this == &c) return 1;
00009   return ( (Real == c.Real)  &&  (Imag == c.Imag) );
00010 }

BOOL JComplex::operator!= const CplxDouble    r const [inline]
 

Definition at line 31 of file CplxComp.cpp.

00031                                                            {
00032   return !Compare( r );
00033 }

BOOL JComplex::operator!= const JComplex &    c const [inline]
 

Definition at line 16 of file CplxComp.cpp.

Referenced by CplxNumber().

00016                                                           {
00017   return !Compare( c );
00018 }

JComplex JComplex::operator+ const JComplex &    left,
const CplxDouble    x
[inline]
 

Definition at line 46 of file CplxAdd.cpp.

00048 {
00049   return JComplex( (left.Real + x), (left.Imag) );
00050 }

JComplex JComplex::operator+ const CplxDouble    x,
const JComplex &    right
[inline]
 

Definition at line 34 of file CplxAdd.cpp.

00036 {
00037   return JComplex( (x + right.Real), (right.Imag) );
00038 }

JComplex & JComplex::operator+= const CplxDouble    r [inline]
 

Definition at line 73 of file CplxAdd.cpp.

00073                                                           {
00074   Real = Real + x;
00075   return (*this);
00076 }

JComplex & JComplex::operator+= const JComplex &    c [inline]
 

Self-Addition and Self-Substraction operators /////////////////////////////////////////////////////////////////////////////.

Definition at line 61 of file CplxAdd.cpp.

Referenced by CplxNumber().

00061                                                          {
00062   Real = Real + c.Real;
00063   Imag = Imag + c.Imag;
00064   return (*this);
00065 }

JComplex JComplex::operator- const JComplex &    left,
const CplxDouble    x
[inline]
 

Definition at line 52 of file CplxAdd.cpp.

00054 {
00055   return JComplex( (left.Real - x), (left.Imag) );
00056 }

JComplex JComplex::operator- const CplxDouble    x,
const JComplex &    right
[inline]
 

Definition at line 40 of file CplxAdd.cpp.

00042 {
00043   return JComplex( (x - right.Real), (right.Imag) );
00044 }

JComplex & JComplex::operator-= const CplxDouble    r [inline]
 

Definition at line 78 of file CplxAdd.cpp.

00078                                                           {
00079   Real = Real - x;
00080   return (*this);
00081 }

JComplex & JComplex::operator-= const JComplex &    c [inline]
 

Definition at line 67 of file CplxAdd.cpp.

Referenced by CplxNumber().

00067                                                          {
00068   Real = Real - c.Real;
00069   Imag = Imag - c.Imag;
00070   return (*this);
00071 }

JComplex & JComplex::operator= const CplxDouble   x
 

Assignment operators /////////////////////////////////////////////////////////////////////////////.

Definition at line 7 of file CplxAdd.cpp.

00007                                                    {
00008   Real = x;
00009   Imag = 0;
00010   return (*this);
00011 }                                                                       

JComplex & JComplex::operator= const JComplex &    c
 

Assignment operators ///////////////////////////////////////////////////////////////////////////// Defined in: CplxAdd.cpp /////////////////////////////////////////////////////////////////////////////.

Definition at line 13 of file CplxAdd.cpp.

Referenced by CplxNumber().

00013                                                  {
00014   Real = c.Real; 
00015   Imag = c.Imag; 
00016   return (*this);
00017 }                                                                       

BOOL JComplex::operator== const CplxDouble    r const [inline]
 

Definition at line 27 of file CplxComp.cpp.

00027                                                            {
00028   return Compare( r );
00029 }

BOOL JComplex::operator== const JComplex &    c const [inline]
 

Definition at line 12 of file CplxComp.cpp.

Referenced by CplxNumber().

00012                                                           {
00013   return Compare( c );
00014 }


Friends And Related Function Documentation

BOOL Compare const JComplex &    l,
const CplxDouble    x
[friend]
 

Compare CplxDouble with a Complex (Friend functions) /// True, if Real only and equal /////////////////////////////////////////////////////////////////////////////.

Definition at line 57 of file CplxComp.cpp.

00058 {
00059   return ( (l.Real == x) && (l.Imag == 0) );
00060 }                                                                        

BOOL operator!= const CplxDouble    x,
const JComplex &    right
[friend]
 

Definition at line 80 of file CplxComp.cpp.

00082 {
00083   return Compare( right, x );
00084 }                                                                        

BOOL operator!= const JComplex &    left,
const CplxDouble    x
[friend]
 

Definition at line 68 of file CplxComp.cpp.

00070 {
00071   return Compare( left, x );
00072 }

BOOL operator!= const JComplex &    left,
const JComplex &    right
[friend]
 

Definition at line 48 of file CplxComp.cpp.

00050 {
00051   return Compare( left, right );
00052 }

JComplex JComplex::operator+ const JComplex &    left,
const JComplex &    right
[friend]
 

Addition and Substraction operators /////////////////////////////////////////////////////////////////////////////.

Definition at line 141 of file Complex.old.

00141                                                                        {
00142   return JComplex( (left.Real + right.Real), (left.Imag + right.Imag) );
00143 }

JComplex JComplex::operator- const JComplex &    left,
const JComplex &    right
[friend]
 

Definition at line 145 of file Complex.old.

00145                                                                        {
00146   return JComplex( (left.Real - right.Real), (left.Imag - right.Imag) );
00147 }

BOOL operator== const CplxDouble    x,
const JComplex &    right
[friend]
 

Definition at line 74 of file CplxComp.cpp.

00076 {
00077   return Compare( right, x );
00078 }                                                                        

BOOL operator== const JComplex &    left,
const CplxDouble    x
[friend]
 

Definition at line 62 of file CplxComp.cpp.

00064 {
00065   return Compare( left, x );
00066 }

BOOL operator== const JComplex &    l,
const JComplex &    r
[friend]
 

Definition at line 164 of file COMPLEX.CPP.

00164                                                                         {  
00165     return Compare( l, r );                                                
00166   }                                                                        


The documentation for this class was generated from the following files:
Generated on Sun Oct 14 18:48:44 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001