complex< C > Class Template Reference

#include <complex.hpp>

List of all members.

Public Member Functions

Friends


Detailed Description

template<typename C>
class mmx::complex< C >

Definition at line 34 of file complex.hpp.


Constructor & Destructor Documentation

complex (  )  [inline]

Definition at line 40 of file complex.hpp.

00040 {}

complex ( const format< C > &  fm  )  [inline]

Definition at line 41 of file complex.hpp.

00041                                       :
00042     re (get_sample (fm)), im (get_sample (fm)) {}
  template<typename T> inline complex (const T& x):

complex ( const T x  )  [inline]

Definition at line 43 of file complex.hpp.

00043                                                   :
00044     re (as<C> (x)), im (as<C> (promote (0, x))) {}
  template<typename T> inline complex (const complex<T>& z):

complex ( const complex< T > &  z  )  [inline]

Definition at line 45 of file complex.hpp.

00045                                                            :
00046     re (Re (z)), im (Im (z)) {}
  template<typename XT,typename YT> inline

complex ( const XT &  x,
const YT &  y 
) [inline]

Definition at line 48 of file complex.hpp.

00048                                     :
00049     re (x), im (y) {}
  friend C Re LESSGTR (const Complex& z);


Member Function Documentation

complex< C > & operator*= ( const complex< C > &  z  )  [inline]

Definition at line 407 of file complex.hpp.

00407                                       {
00408   C RE= re, zRE= z.re;
00409   re= re * z.re - im * z.im;
00410   im= RE * z.im + im * zRE;
00411   return *this;
00412 }

complex< C > & operator*= ( const C x  )  [inline]

Definition at line 393 of file complex.hpp.

00393                                 {
00394   re *= x;
00395   im *= x;
00396   return *this;
00397 }

complex< C > & operator+= ( const complex< C > &  z  )  [inline]

Definition at line 379 of file complex.hpp.

00379                                       {
00380   re += z.re;
00381   im += z.im;
00382   return *this;
00383 }

complex< C > & operator-= ( const complex< C > &  z  )  [inline]

Definition at line 386 of file complex.hpp.

00386                                       {
00387   re -= z.re;
00388   im -= z.im;
00389   return *this;
00390 }

complex< C > & operator/= ( const complex< C > &  z  )  [inline]

Definition at line 415 of file complex.hpp.

00415                                       {
00416   C RE= re;
00417   C a = norm (z);
00418   re= (re * z.re + im * z.im) / a;
00419   im= (im * z.re - RE * z.im) / a;
00420   return *this;
00421 }

complex< C > & operator/= ( const C x  )  [inline]

Definition at line 400 of file complex.hpp.

00400                                 {
00401   re /= x;
00402   im /= x;
00403   return *this;
00404 }

complex< C > & operator<<= ( const xint shift  )  [inline]

Definition at line 648 of file complex.hpp.

References mmx::incexp2_assign().

00648                                         {
00649   incexp2_assign (re, shift);
00650   incexp2_assign (im, shift);
00651   return *this;
00652 }

complex< C > & operator>>= ( const xint shift  )  [inline]

Definition at line 655 of file complex.hpp.

References mmx::decexp2_assign().

00655                                         {
00656   decexp2_assign (re, shift);
00657   decexp2_assign (im, shift);
00658   return *this;
00659 }


Friends And Related Function Documentation

C& Im LESSGTR ( complex< C > &  z  )  [friend]
C& Re LESSGTR ( complex< C > &  z  )  [friend]
C Im LESSGTR ( const complex< C > &  z  )  [friend]
C Re LESSGTR ( const complex< C > &  z  )  [friend]

The documentation for this class was generated from the following file:

Generated on 6 Dec 2012 for numerix by  doxygen 1.6.1