TBCI Numerical high perf. C++ Library  2.8.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cplx< T > Class Template Reference

Our own complex class. More...

#include <cplx.h>

Public Types

typedef T value_type
 
typedef T aligned_value_type TALIGN (MIN_ALIGN)
 
typedef T cplx_base
 
typedef cplx< Tcplx_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)
 
T real () const
 
T imag () const
 
Treal ()
 
Timag ()
 
cplx< Toperator+ (const cplx< T > &) const
 
cplx< Toperator- (const cplx< T > &) const
 
cplx< Toperator* (const cplx< T > &) const
 
cplx< Toperator/ (const cplx< T > &) const
 
cplx< Tplus (const T v) const
 
cplx< Tminus (const T v) const
 
cplx< Tmult (const T v) const
 
cplx< Tdiv (const T a) const
 
cplx< Toperator+ (const T) const
 
cplx< Toperator- (const T) const
 
cplx< Toperator* (const T) const
 
cplx< Toperator/ (const T) const
 
cplx< Toperator- () const
 
cplx< Toperator~ () const
 
T theta () const
 
cplx< Tconj () const
 
cplx< T > & do_conj ()
 
double fabssqr () const
 
double fabs () const
 
double norm () const
 
T abs () const
 
cplx< Texp () const
 
cplx< Tsqrt () const
 
cplx< Tpower (const double) const
 
cplx< Tpower (const cplx< T > &) const
 
cplx< Tln () const
 
cplx< Tsin () const
 
cplx< Tcos () const
 
cplx< Tsinh () const
 
cplx< Tcosh () const
 
cplx< Tasin () const
 
cplx< Tacos () const
 
cplx< Tatan () const
 
cplx< Tasinh () const
 
cplx< Tacosh () const
 
cplx< Tatanh () 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 ALIGN (MIN_ALIGN)
 

Protected Attributes

T re im
 

Friends

template<typename U >
class cplx
 
cplx< T > dot FGD (const cplx< T > &, const cplx< T > &)
 
STD__ ostream & operator<< FGD (STD__ ostream &, const cplx< T > &)
 
STD__ istream & operator>> FGD (STD__ istream &, cplx< T > &)
 

Detailed Description

template<typename T>
class cplx< T >

Our own complex class.

Definition at line 48 of file cplx.h.

Member Typedef Documentation

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

Definition at line 67 of file cplx.h.

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

Definition at line 68 of file cplx.h.

template<typename T>
typedef T aligned_value_type cplx< T >::TALIGN(MIN_ALIGN)

Definition at line 66 of file cplx.h.

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

Definition at line 65 of file cplx.h.

Constructor & Destructor Documentation

template<typename T>
cplx< T >::cplx ( )
inline

Definition at line 71 of file cplx.h.

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

Definition at line 72 of file cplx.h.

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

Definition at line 73 of file cplx.h.

template<typename T>
template<typename U >
cplx< T >::cplx ( const cplx< U > &  c)
inlineexplicit

Definition at line 79 of file cplx.h.

template<typename T>
cplx< T >::~cplx ( )
inline

Definition at line 85 of file cplx.h.

Member Function Documentation

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

Definition at line 411 of file cplx.h.

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

template<typename T >
cplx< T > cplx< T >::acos ( ) const

Definition at line 532 of file cplx.h.

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

template<typename T >
cplx< T > cplx< T >::acosh ( ) const

Definition at line 546 of file cplx.h.

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

template<typename T>
T re cplx< T >::ALIGN ( MIN_ALIGN  )
protected

Referenced by cplx< T >::div().

template<typename T >
cplx< T > cplx< T >::asin ( ) const

Definition at line 525 of file cplx.h.

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

template<typename T >
cplx< T > cplx< T >::asinh ( ) const

Definition at line 539 of file cplx.h.

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

template<typename T >
cplx< T > cplx< T >::atan ( ) const

Definition at line 553 of file cplx.h.

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

template<typename T >
cplx< T > cplx< T >::atanh ( ) const

Definition at line 560 of file cplx.h.

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

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

Definition at line 158 of file cplx.h.

References cplx< T >::im.

template<typename T >
cplx< T > cplx< T >::cos ( ) const

Definition at line 506 of file cplx.h.

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

template<typename T >
cplx< T > cplx< T >::cosh ( ) const

Definition at line 519 of file cplx.h.

References exp().

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

Definition at line 137 of file cplx.h.

References cplx< T >::ALIGN(), cplx< T >::im, MIN_ALIGN, REGISTER, and T.

Referenced by operator/().

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

Definition at line 162 of file cplx.h.

References cplx< T >::im.

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

Definition at line 473 of file cplx.h.

References exp(), expi(), GLBL__, std::imag(), MATH__, real, and TBCI__.

Referenced by cplx< T >::cos(), and cplx< T >::sin().

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

Definition at line 395 of file cplx.h.

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

template<typename T>
double cplx< T >::fabssqr ( ) const
inline
template<typename T>
T cplx< T >::imag ( ) const
inline

Definition at line 107 of file cplx.h.

References cplx< T >::im.

Referenced by besselh1(), besselh2(), besseli(), besselj(), besselk(), bessely(), gamma(), HypergeometricU(), and sqr().

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

Definition at line 110 of file cplx.h.

References cplx< T >::im.

template<typename T >
cplx< T > cplx< T >::ln ( ) const
inline
template<typename T>
cplx<T> cplx< T >::minus ( const T  v) const
inline

Definition at line 130 of file cplx.h.

References cplx< T >::im.

Referenced by operator-().

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

Definition at line 133 of file cplx.h.

References cplx< T >::im.

Referenced by operator*().

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

Definition at line 166 of file cplx.h.

References cplx< T >::fabssqr().

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

Definition at line 190 of file cplx.h.

References cplx< T >::im.

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

Definition at line 294 of file cplx.h.

References cplx< T >::im.

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

Definition at line 361 of file cplx.h.

References b, and cplx< T >::im.

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

Definition at line 245 of file cplx.h.

References a, and cplx< T >::im.

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

Definition at line 252 of file cplx.h.

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

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

Definition at line 280 of file cplx.h.

References cplx< T >::im.

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

Definition at line 347 of file cplx.h.

References b, and cplx< T >::im.

template<typename T >
NAMESPACE_CSTD_END NAMESPACE_TBCI cplx< T > & cplx< T >::operator+= ( const T  a)
inline

Definition at line 218 of file cplx.h.

References a.

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

Definition at line 225 of file cplx.h.

References cplx< T >::im.

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

Definition at line 287 of file cplx.h.

References cplx< T >::im.

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

Definition at line 354 of file cplx.h.

References b, and cplx< T >::im.

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

Definition at line 375 of file cplx.h.

References cplx< T >::im.

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

Definition at line 231 of file cplx.h.

References a.

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

Definition at line 238 of file cplx.h.

References cplx< T >::im.

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

Definition at line 307 of file cplx.h.

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

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

Definition at line 368 of file cplx.h.

References b, and cplx< T >::im.

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

Definition at line 262 of file cplx.h.

References a, and cplx< T >::im.

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

Definition at line 268 of file cplx.h.

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

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

Definition at line 194 of file cplx.h.

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

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

Definition at line 195 of file cplx.h.

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

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

Definition at line 89 of file cplx.h.

References cplx< T >::im, and T.

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

Definition at line 90 of file cplx.h.

References cplx< T >::im.

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

Definition at line 189 of file cplx.h.

References cplx< T >::im.

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

Definition at line 192 of file cplx.h.

References cplx< T >::fabssqr().

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

Definition at line 193 of file cplx.h.

References cplx< T >::fabssqr().

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

Definition at line 382 of file cplx.h.

References cplx< T >::im.

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

Definition at line 127 of file cplx.h.

References cplx< T >::im.

Referenced by operator+().

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

Definition at line 479 of file cplx.h.

References expi(), std::fabs(), GLBL__, MATH__, pow(), TBCI__, and cplx< T >::theta().

template<typename T >
cplx< T > cplx< T >::power ( const cplx< T > &  z) const

Definition at line 485 of file cplx.h.

References exp(), expi(), std::fabs(), GLBL__, cplx< T >::im, log(), MATH__, T, and cplx< T >::theta().

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

Definition at line 106 of file cplx.h.

Referenced by besselh1(), besselh2(), besseli(), besselj(), besselk(), bessely(), gamma(), HypergeometricU(), and sqr().

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

Definition at line 109 of file cplx.h.

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

Definition at line 104 of file cplx.h.

References i, and cplx< T >::im.

template<typename T >
cplx< T > cplx< T >::sin ( ) const

Definition at line 499 of file cplx.h.

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

template<typename T >
cplx< T > cplx< T >::sinh ( ) const

Definition at line 513 of file cplx.h.

References exp().

template<typename T >
cplx< T > cplx< T >::sqrt ( ) const

Definition at line 467 of file cplx.h.

References expi(), std::fabs(), GLBL__, MATH__, std::sqrt(), TBCI__, and cplx< T >::theta().

template<typename T >
T cplx< T >::theta ( ) const

Definition at line 427 of file cplx.h.

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

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

Friends And Related Function Documentation

template<typename T>
template<typename U >
friend class cplx
friend

Definition at line 78 of file cplx.h.

template<typename T>
cplx<T> dot FGD ( const cplx< T > &  ,
const cplx< T > &   
)
friend
template<typename T>
STD__ ostream& operator<< FGD ( STD__ ostream &  ,
const cplx< T > &   
)
friend
template<typename T>
STD__ istream& operator>> FGD ( STD__ istream &  ,
cplx< T > &   
)
friend

Member Data Documentation

template<typename T>
T re cplx< T >::im
protected

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