TBCI::cplx< T > Class Template Reference

Our own complex class. More...

#include <cplx.h>

Collaboration diagram for TBCI::cplx< T >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef T value_type
typedef T aligned_value_type
typedef T cplx_base
typedef cplx< T > cplx_t

Public Member Functions

 cplx ()
 cplx (const T r, const T i=(T) 0)
 cplx (const cplx< T > &c)
template<typename U>
 cplx (const cplx< U > &c)
 ~cplx ()
cplx< T > & operator= (const T r)
cplx< T > & operator= (const cplx< T > &c)
cplx< T > & operator+= (const T)
cplx< T > & operator+= (const cplx< T > &)
cplx< T > & operator-= (const T)
cplx< T > & operator-= (const cplx< T > &)
cplx< T > & operator*= (const T)
cplx< T > & operator*= (const cplx< T > &)
cplx< T > & operator/= (const T)
cplx< T > & operator/= (const cplx< T > &)
cplx< T > & set (const T r, const T i)
real () const
imag () const
T & real ()
T & imag ()
cplx< T > operator+ (const cplx< T > &) const
cplx< T > operator- (const cplx< T > &) const
cplx< T > operator* (const cplx< T > &) const
cplx< T > operator/ (const cplx< T > &) const
cplx< T > plus (const T v) const
cplx< T > minus (const T v) const
cplx< T > mult (const T v) const
cplx< T > div (const T a) const
cplx< T > operator+ (const T) const
cplx< T > operator- (const T) const
cplx< T > operator* (const T) const
cplx< T > operator/ (const T) const
cplx< T > operator- () const
cplx< T > operator~ () const
theta () const
cplx< T > conj () const
cplx< T > & do_conj ()
double fabssqr () const
double fabs () const
double norm () const
abs () const
cplx< T > exp () const
cplx< T > sqrt () const
cplx< T > power (const double) const
cplx< T > power (const cplx< T > &) const
cplx< T > ln () const
cplx< T > sin () const
cplx< T > cos () const
cplx< T > sinh () const
cplx< T > cosh () const
cplx< T > asin () const
cplx< T > acos () const
cplx< T > atan () const
cplx< T > asinh () const
cplx< T > acosh () const
cplx< T > atanh () const
bool operator== (const cplx< T > &c) const
bool operator!= (const cplx< T > &c) const
bool operator> (const cplx< T > &c) const
bool operator>= (const cplx< T > &c) const
bool operator< (const cplx< T > &c) const
bool operator<= (const cplx< T > &c) const

Protected Member Functions

T re __attribute__ ((aligned(8)))

Protected Attributes

T re im

Friends

class cplx
cplx< T > dot (const cplx< T > &, const cplx< T > &)
std::ostream & operator<< (std::ostream &, const cplx< T > &)
std::istream & operator>> (std::istream &, cplx< T > &)


Detailed Description

template<typename T>
class TBCI::cplx< T >

Our own complex class.

Definition at line 55 of file cplx.h.


Member Typedef Documentation

template<typename T>
typedef T TBCI::cplx< T >::value_type

Definition at line 65 of file cplx.h.

template<typename T>
typedef T TBCI::cplx< T >::aligned_value_type

Definition at line 66 of file cplx.h.

template<typename T>
typedef T TBCI::cplx< T >::cplx_base

Definition at line 67 of file cplx.h.

template<typename T>
typedef cplx<T> TBCI::cplx< T >::cplx_t

Definition at line 68 of file cplx.h.


Constructor & Destructor Documentation

template<typename T>
TBCI::cplx< T >::cplx (  )  [inline]

Definition at line 71 of file cplx.h.

template<typename T>
TBCI::cplx< T >::cplx ( const T  r,
const T  i = (T)0 
) [inline]

Definition at line 72 of file cplx.h.

template<typename T>
TBCI::cplx< T >::cplx ( const cplx< T > &  c  )  [inline]

Definition at line 73 of file cplx.h.

template<typename T>
template<typename U>
TBCI::cplx< T >::cplx ( const cplx< U > &  c  )  [inline, explicit]

Definition at line 79 of file cplx.h.

template<typename T>
TBCI::cplx< T >::~cplx (  )  [inline]

Definition at line 85 of file cplx.h.


Member Function Documentation

template<typename T>
T re TBCI::cplx< T >::__attribute__ ( (aligned(8))   )  [protected]

template<typename T>
cplx<T>& TBCI::cplx< T >::operator= ( const T  r  )  [inline]

Definition at line 89 of file cplx.h.

References T.

template<typename T>
cplx<T>& TBCI::cplx< T >::operator= ( const cplx< T > &  c  )  [inline]

Definition at line 90 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > & TBCI::cplx< T >::operator+= ( const T  a  )  [inline]

Definition at line 218 of file cplx.h.

template<typename T>
cplx< T > & TBCI::cplx< T >::operator+= ( const cplx< T > &  a  )  [inline]

Definition at line 225 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > & TBCI::cplx< T >::operator-= ( const T  a  )  [inline]

Definition at line 231 of file cplx.h.

template<typename T>
cplx< T > & TBCI::cplx< T >::operator-= ( const cplx< T > &  a  )  [inline]

Definition at line 238 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > & TBCI::cplx< T >::operator*= ( const T  a  )  [inline]

Definition at line 245 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > & TBCI::cplx< T >::operator*= ( const cplx< T > &  a  )  [inline]

Definition at line 252 of file cplx.h.

References ALIGN, TBCI::cplx< T >::im, MIN_ALIGN, and T.

template<typename T>
cplx< T > & TBCI::cplx< T >::operator/= ( const T  a  )  [inline]

Definition at line 262 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > & TBCI::cplx< T >::operator/= ( const cplx< T > &  a  )  [inline]

Definition at line 268 of file cplx.h.

References ALIGN, TBCI::cplx< T >::im, MIN_ALIGN, and T.

template<typename T>
cplx<T>& TBCI::cplx< T >::set ( const T  r,
const T  i 
) [inline]

Definition at line 104 of file cplx.h.

template<typename T>
T TBCI::cplx< T >::real (  )  const [inline]

template<typename T>
T TBCI::cplx< T >::imag (  )  const [inline]

template<typename T>
T& TBCI::cplx< T >::real (  )  [inline]

Definition at line 109 of file cplx.h.

template<typename T>
T& TBCI::cplx< T >::imag (  )  [inline]

Definition at line 110 of file cplx.h.

template<typename T>
cplx< T > TBCI::cplx< T >::operator+ ( const cplx< T > &  a  )  const [inline]

Definition at line 280 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > TBCI::cplx< T >::operator- ( const cplx< T > &  a  )  const [inline]

Definition at line 287 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > TBCI::cplx< T >::operator* ( const cplx< T > &  a  )  const [inline]

Definition at line 294 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > TBCI::cplx< T >::operator/ ( const cplx< T > &  a  )  const [inline]

Definition at line 307 of file cplx.h.

References ALIGN, TBCI::cplx< T >::im, MIN_ALIGN, and T.

template<typename T>
cplx<T> TBCI::cplx< T >::plus ( const T  v  )  const [inline]

Definition at line 127 of file cplx.h.

Referenced by TBCI::operator+().

template<typename T>
cplx<T> TBCI::cplx< T >::minus ( const T  v  )  const [inline]

Definition at line 130 of file cplx.h.

Referenced by TBCI::operator-().

template<typename T>
cplx<T> TBCI::cplx< T >::mult ( const T  v  )  const [inline]

Definition at line 133 of file cplx.h.

Referenced by TBCI::operator*().

template<typename T>
cplx<T> TBCI::cplx< T >::div ( const T  a  )  const [inline]

Definition at line 137 of file cplx.h.

References ALIGN, MIN_ALIGN, and T.

Referenced by TBCI::operator/().

template<typename T>
cplx< T > TBCI::cplx< T >::operator+ ( const T  b  )  const [inline]

Definition at line 347 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > TBCI::cplx< T >::operator- ( const T  b  )  const [inline]

Definition at line 354 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > TBCI::cplx< T >::operator* ( const T  b  )  const [inline]

Definition at line 361 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > TBCI::cplx< T >::operator/ ( const T  b  )  const [inline]

Definition at line 368 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > TBCI::cplx< T >::operator- (  )  const [inline]

Definition at line 375 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
cplx< T > TBCI::cplx< T >::operator~ (  )  const [inline]

Definition at line 382 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
T TBCI::cplx< T >::theta (  )  const [inline]

Definition at line 427 of file cplx.h.

References atan2(), TBCI::cplx< T >::im, LIKELY, pi, and UNLIKELY.

Referenced by TBCI::cplx< T >::ln(), TBCI::cplx< T >::power(), and TBCI::cplx< T >::sqrt().

template<typename T>
cplx<T> TBCI::cplx< T >::conj (  )  const [inline]

Definition at line 158 of file cplx.h.

template<typename T>
cplx<T>& TBCI::cplx< T >::do_conj (  )  [inline]

Definition at line 162 of file cplx.h.

template<typename T>
double TBCI::cplx< T >::fabssqr (  )  const [inline]

Definition at line 164 of file cplx.h.

Referenced by TBCI::fabssqr(), TBCI::cplx< T >::operator>(), and TBCI::cplx< T >::operator>=().

template<typename T>
double TBCI::cplx< T >::fabs (  )  const [inline]

template<typename T>
double TBCI::cplx< T >::norm (  )  const [inline]

Definition at line 166 of file cplx.h.

References TBCI::fabssqr().

template<typename T>
T TBCI::cplx< T >::abs (  )  const [inline]

Definition at line 411 of file cplx.h.

References CSTD__, GLBL__, TBCI::cplx< T >::im, MATH__, TBCI::cplx< T >::sqrt(), and UNLIKELY.

template<typename T>
cplx< T > TBCI::cplx< T >::exp (  )  const [inline]

template<typename T>
cplx< T > TBCI::cplx< T >::sqrt (  )  const [inline]

template<typename T>
cplx< T > TBCI::cplx< T >::power ( const double  n  )  const [inline]

template<typename T>
cplx< T > TBCI::cplx< T >::power ( const cplx< T > &  z  )  const [inline]

template<typename T>
cplx< T > TBCI::cplx< T >::ln (  )  const [inline]

template<typename T>
cplx< T > TBCI::cplx< T >::sin (  )  const [inline]

Definition at line 499 of file cplx.h.

References TBCI::cplx< T >::exp(), and TBCI::cplx< T >::im.

Referenced by TBCI::expi().

template<typename T>
cplx< T > TBCI::cplx< T >::cos (  )  const [inline]

Definition at line 506 of file cplx.h.

References TBCI::cplx< T >::exp(), and TBCI::cplx< T >::im.

Referenced by TBCI::expi().

template<typename T>
cplx< T > TBCI::cplx< T >::sinh (  )  const [inline]

Definition at line 513 of file cplx.h.

References TBCI::cplx< T >::exp().

template<typename T>
cplx< T > TBCI::cplx< T >::cosh (  )  const [inline]

Definition at line 519 of file cplx.h.

References TBCI::cplx< T >::exp().

template<typename T>
cplx< T > TBCI::cplx< T >::asin (  )  const [inline]

template<typename T>
cplx< T > TBCI::cplx< T >::acos (  )  const [inline]

Definition at line 532 of file cplx.h.

References std::arg(), GLBL__, TBCI::cplx< T >::ln(), MATH__, TBCI::sqr(), and TBCI::cplx< T >::sqrt().

template<typename T>
cplx< T > TBCI::cplx< T >::atan (  )  const [inline]

Definition at line 553 of file cplx.h.

References std::arg(), TBCI::cplx< T >::im, and TBCI::cplx< T >::ln().

template<typename T>
cplx< T > TBCI::cplx< T >::asinh (  )  const [inline]

Definition at line 539 of file cplx.h.

References std::arg(), GLBL__, TBCI::cplx< T >::ln(), MATH__, TBCI::sqr(), and TBCI::cplx< T >::sqrt().

template<typename T>
cplx< T > TBCI::cplx< T >::acosh (  )  const [inline]

Definition at line 546 of file cplx.h.

References std::arg(), GLBL__, TBCI::cplx< T >::ln(), MATH__, TBCI::sqr(), and TBCI::cplx< T >::sqrt().

template<typename T>
cplx< T > TBCI::cplx< T >::atanh (  )  const [inline]

Definition at line 560 of file cplx.h.

References std::arg(), and TBCI::cplx< T >::ln().

template<typename T>
bool TBCI::cplx< T >::operator== ( const cplx< T > &  c  )  const [inline]

Definition at line 189 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
bool TBCI::cplx< T >::operator!= ( const cplx< T > &  c  )  const [inline]

Definition at line 190 of file cplx.h.

References TBCI::cplx< T >::im.

template<typename T>
bool TBCI::cplx< T >::operator> ( const cplx< T > &  c  )  const [inline]

Definition at line 192 of file cplx.h.

References TBCI::cplx< T >::fabssqr(), and TBCI::fabssqr().

template<typename T>
bool TBCI::cplx< T >::operator>= ( const cplx< T > &  c  )  const [inline]

Definition at line 193 of file cplx.h.

References TBCI::cplx< T >::fabssqr(), and TBCI::fabssqr().

template<typename T>
bool TBCI::cplx< T >::operator< ( const cplx< T > &  c  )  const [inline]

Definition at line 194 of file cplx.h.

References TBCI::fabssqr().

template<typename T>
bool TBCI::cplx< T >::operator<= ( const cplx< T > &  c  )  const [inline]

Definition at line 195 of file cplx.h.

References TBCI::fabssqr().


Friends And Related Function Documentation

template<typename T>
friend class cplx [friend]

Definition at line 78 of file cplx.h.

template<typename T>
cplx<T> dot ( const cplx< T > &  a,
const cplx< T > &  b 
) [friend]

Definition at line 300 of file cplx.h.

template<typename T>
std:: ostream& operator<< ( std::ostream &  os,
const cplx< T > &  c 
) [friend]

Definition at line 621 of file cplx.h.

template<typename T>
std:: istream& operator>> ( std::istream &  in,
cplx< T > &  c 
) [friend]

Definition at line 627 of file cplx.h.


Member Data Documentation

template<typename T>
T re TBCI::cplx< T >::im [protected]


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

Generated on Wed Nov 20 09:29:18 2013 for TBCI Numerical high perf. C++ Library by  doxygen 1.5.6