#include <j2k/Fred/Math/Complex.hpp>Go to the source code of this file.
|
||||||||||||
|
Definition at line 303 of file Complex.old. Referenced by operator!=(), JVector2D::operator!=(), Vector4D::operator!=(), Matrix4By4::operator!=(), JArea::operator!=(), JVector3D::operator!=(), operator==(), JVector2D::operator==(), Vector4D::operator==(), and JVector3D::operator==().
|
|
|
Definition at line 246 of file Complex.old. Referenced by Compare(), JComplex::Compare(), CplxNumber(), operator *(), operator *=(), operator+(), JComplex::operator+(), operator+=(), JComplex::operator+=(), operator-(), JComplex::operator-(), operator-=(), JComplex::operator-=(), operator/(), operator/=(), operator=(), and JComplex::operator=().
00246 {
00247 return (Imag);
00248 }
|
|
|
Definition at line 238 of file Complex.old. 00238 {
00239 return (Imag = y);
00240 }
|
|
|
Definition at line 242 of file Complex.old. Referenced by Compare(), JComplex::Compare(), CplxNumber(), operator *(), operator *=(), operator+(), JComplex::operator+(), operator+=(), JComplex::operator+=(), operator-(), JComplex::operator-(), operator-=(), JComplex::operator-=(), operator/(), operator/=(), operator=(), and JComplex::operator=().
00242 {
00243 return (Real);
00244 }
|
|
|
Utilities /////////////////////////////////////////////////////////////////////////////.
Definition at line 234 of file Complex.old. 00234 {
00235 return (Real = x);
00236 }
|
|
|
Definition at line 350 of file Complex.old. Referenced by CplxNumber().
00350 {
00351 return ( _Inf._D );
00352 }
|
|
|
Definition at line 354 of file Complex.old. Referenced by CplxNumber().
00354 {
00355 double temp = (double)x;
00356 return (_Dtest(&temp) == _INFCODE);
00357 }
|
|
|
Definition at line 359 of file Complex.old. Referenced by CplxNumber().
00359 {
00360 double temp = (double)x;
00361 return (_Dtest(&temp) == _NANCODE);
00362 }
|
|
|
Definition at line 364 of file Complex.old. Referenced by CplxNumber().
00364 {
00365 return (_Nan._D);
00366 }
|
|
||||||||||||
|
Definition at line 204 of file Complex.old. |
|
|
Definition at line 285 of file Complex.old. Referenced by CplxNumber().
00285 {
00286 Real = Real * x;
00287 Imag = Imag * x;
00288 return (*this);
00289 }
|
|
||||||||||||
|
Multiplication and Division operations /////////////////////////////////////////////////////////////////////////////.
Definition at line 165 of file Complex.old. 00165 {
00166 // Reminder: (a+bj)(c+dj) = (ac + bcj + adj + bdjj)
00167 // Result: (ac - bd) + ( bc + ad )j
00168 // jj = -1, by definition.
00169
00170 CplxNumber Temp_Re = (x.Real * y.Real) - (x.Imag * y.Imag);
00171 CplxNumber Temp_Im = (x.Imag * y.Real) + (x.Real * y.Imag);
00172
00173 x.Real = Temp_Re;
00174 x.Imag = Temp_Im;
00175
00176 return (x);
00177 }
|
|
||||||||||||
|
Definition at line 311 of file Complex.old. |
|
||||||||||||
|
Definition at line 141 of file Complex.old. |
|
|
Definition at line 263 of file Complex.old. 00263 {
00264 Real = Real + x;
00265 return (*this);
00266 }
|
|
||||||||||||
|
Definition at line 119 of file Complex.old. |
|
||||||||||||
|
Definition at line 145 of file Complex.old. |
|
|
Definition at line 274 of file Complex.old. 00274 {
00275 Real = Real - x;
00276 return (*this);
00277 }
|
|
||||||||||||
|
Definition at line 125 of file Complex.old. |
|
||||||||||||
|
Definition at line 221 of file Complex.old. 00221 {
00222 const CplxDouble Tmp1 = right.Real / right.Imag;
00223 const CplxDouble Tmp2 = right.Imag + (Tmp1 * right.Real);
00224
00225 return JComplex(
00226 ( (left.Real * Tmp1 + left.Imag) / Tmp2 ),
00227 ( (left.Imag * Tmp1 - left.Real) / Tmp2 )
00228 );
00229 }
|
|
|
Definition at line 291 of file Complex.old. Referenced by CplxNumber().
00291 {
00292 Real = Real / x;
00293 Imag = Imag / x;
00294 return (*this);
00295 }
|
|
||||||||||||
|
Definition at line 179 of file Complex.old. 00179 {
00180 // Reminder: (a+bj)/(c+dj) = (a+bj)(c-dj) / [ (c+dj)(c-dj) ]
00181 // = (ac + bcj - adj - bdjj) / (cc - ddjj)
00182 // = [ (ac + bd) + ( bc - ad )j ] / [ cc + dd ]
00183 // jj = -1, by definition.
00184
00185 // Doesn't handle Divide by Zero, but STL does it.
00186
00187 CplxNumber Temp_delta = (y.Real * y.Real) + (y.Imag * y.Imag);
00188 CplxNumber Temp_Re = (x.Real * y.Real) + (x.Imag * y.Imag);
00189 CplxNumber Temp_Im = (x.Imag * y.Real) - (x.Real * y.Imag);
00190
00191 x.Real = Temp_Re / Temp_delta;
00192 x.Imag = Temp_Im / Temp_delta;
00193
00194 return (x);
00195 }
|
|
|
Definition at line 257 of file Complex.old. |
|
|
Definition at line 251 of file Complex.old. 00251 {
00252 Real = x;
00253 Imag = 0;
00254 return (*this);
00255 }
|
|
||||||||||||
|
Definition at line 307 of file Complex.old. |
|
|
Definition at line 299 of file Complex.old. |
|
|
Definition at line 298 of file Complex.old. |
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001