TBCI Numerical high perf. C++ Library 2.8.0
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 55 of file cplx.h.

Member Typedef Documentation

◆ cplx_base

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

Definition at line 67 of file cplx.h.

◆ cplx_t

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

Definition at line 68 of file cplx.h.

◆ TALIGN

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

Definition at line 66 of file cplx.h.

◆ value_type

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

Definition at line 65 of file cplx.h.

Constructor & Destructor Documentation

◆ cplx() [1/4]

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

Definition at line 71 of file cplx.h.

◆ cplx() [2/4]

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

Definition at line 72 of file cplx.h.

References i, im, and T.

◆ cplx() [3/4]

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

Definition at line 73 of file cplx.h.

References c, cplx, and im.

◆ cplx() [4/4]

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

Definition at line 79 of file cplx.h.

References c, cplx, and im.

◆ ~cplx()

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

Definition at line 85 of file cplx.h.

Member Function Documentation

◆ abs()

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

Definition at line 411 of file cplx.h.

References abs, CSTD__, GLBL__, im, MATH__, sqrt(), T, and UNLIKELY.

◆ acos()

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

Definition at line 532 of file cplx.h.

References arg(), cplx, GLBL__, MATH__, sqr(), and sqrt().

◆ acosh()

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

Definition at line 546 of file cplx.h.

References arg(), cplx, GLBL__, MATH__, sqr(), and sqrt().

◆ ALIGN()

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

References im, MIN_ALIGN, and T.

◆ asin()

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

Definition at line 525 of file cplx.h.

References arg(), cplx, GLBL__, im, MATH__, sqr(), and sqrt().

◆ asinh()

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

Definition at line 539 of file cplx.h.

References arg(), cplx, GLBL__, MATH__, sqr(), and sqrt().

◆ atan()

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

Definition at line 553 of file cplx.h.

References arg(), cplx, and im.

◆ atanh()

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

Definition at line 560 of file cplx.h.

References arg(), and cplx.

◆ conj()

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

Definition at line 158 of file cplx.h.

References cplx, and im.

◆ cos()

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

Definition at line 506 of file cplx.h.

References cplx, exp(), exp(), and im.

◆ cosh()

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

Definition at line 519 of file cplx.h.

References cplx, and exp().

◆ div()

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

Definition at line 137 of file cplx.h.

References a, ALIGN, cplx, im, MIN_ALIGN, REGISTER, and T.

◆ do_conj()

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

Definition at line 162 of file cplx.h.

References cplx, and im.

◆ exp()

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

Definition at line 473 of file cplx.h.

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

Referenced by cos(), and sin().

◆ fabs()

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

Definition at line 395 of file cplx.h.

References fabs(), GLBL__, im, MATH__, sqrt(), and UNLIKELY.

◆ fabssqr()

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

Definition at line 164 of file cplx.h.

References im.

Referenced by norm(), operator<(), operator<=(), operator>(), and operator>=().

◆ imag() [1/2]

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

Definition at line 110 of file cplx.h.

References im, and T.

◆ imag() [2/2]

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

Definition at line 107 of file cplx.h.

References im, and T.

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

◆ ln()

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

Definition at line 493 of file cplx.h.

References cplx, fabs(), GLBL__, log(), MATH__, and theta().

◆ minus()

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

Definition at line 130 of file cplx.h.

References cplx, im, and T.

◆ mult()

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

Definition at line 133 of file cplx.h.

References cplx, im, and T.

◆ norm()

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

Definition at line 166 of file cplx.h.

References fabssqr().

◆ operator!=()

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

Definition at line 190 of file cplx.h.

References c, cplx, and im.

◆ operator*() [1/2]

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

Definition at line 294 of file cplx.h.

References a, cplx, and im.

◆ operator*() [2/2]

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

Definition at line 361 of file cplx.h.

References b, cplx, im, and T.

◆ operator*=() [1/2]

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

Definition at line 252 of file cplx.h.

References a, ALIGN, cplx, im, MIN_ALIGN, REGISTER, and T.

◆ operator*=() [2/2]

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

Definition at line 245 of file cplx.h.

References a, cplx, im, and T.

◆ operator+() [1/2]

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

Definition at line 280 of file cplx.h.

References a, cplx, and im.

◆ operator+() [2/2]

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

Definition at line 347 of file cplx.h.

References b, cplx, im, and T.

◆ operator+=() [1/2]

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

Definition at line 225 of file cplx.h.

References a, cplx, and im.

◆ operator+=() [2/2]

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, cplx, and T.

◆ operator-() [1/3]

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

Definition at line 375 of file cplx.h.

References cplx, and im.

◆ operator-() [2/3]

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

Definition at line 287 of file cplx.h.

References a, cplx, and im.

◆ operator-() [3/3]

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

Definition at line 354 of file cplx.h.

References b, cplx, im, and T.

◆ operator-=() [1/2]

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

Definition at line 238 of file cplx.h.

References a, cplx, and im.

◆ operator-=() [2/2]

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

Definition at line 231 of file cplx.h.

References a, cplx, and T.

◆ operator/() [1/2]

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

Definition at line 307 of file cplx.h.

References a, ALIGN, cplx, im, MIN_ALIGN, REGISTER, and T.

◆ operator/() [2/2]

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

Definition at line 368 of file cplx.h.

References b, cplx, im, and T.

◆ operator/=() [1/2]

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

Definition at line 268 of file cplx.h.

References a, ALIGN, cplx, im, MIN_ALIGN, REGISTER, and T.

◆ operator/=() [2/2]

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

Definition at line 262 of file cplx.h.

References a, cplx, im, and T.

◆ operator<()

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

Definition at line 194 of file cplx.h.

References c, cplx, and fabssqr().

◆ operator<=()

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

Definition at line 195 of file cplx.h.

References c, cplx, and fabssqr().

◆ operator=() [1/2]

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

Definition at line 90 of file cplx.h.

References c, cplx, and im.

◆ operator=() [2/2]

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

Definition at line 89 of file cplx.h.

References cplx, im, and T.

◆ operator==()

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

Definition at line 189 of file cplx.h.

References c, cplx, and im.

◆ operator>()

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

Definition at line 192 of file cplx.h.

References c, cplx, and fabssqr().

◆ operator>=()

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

Definition at line 193 of file cplx.h.

References c, cplx, and fabssqr().

◆ operator~()

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

Definition at line 382 of file cplx.h.

References cplx, and im.

◆ plus()

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

Definition at line 127 of file cplx.h.

References cplx, im, and T.

◆ power() [1/2]

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

Definition at line 485 of file cplx.h.

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

◆ power() [2/2]

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

Definition at line 479 of file cplx.h.

References cplx, expi(), fabs(), GLBL__, MATH__, pow(), TBCI__, and theta().

◆ real() [1/2]

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

Definition at line 109 of file cplx.h.

References T.

◆ real() [2/2]

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

Definition at line 106 of file cplx.h.

References T.

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

◆ set()

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

Definition at line 104 of file cplx.h.

References cplx, i, im, and T.

◆ sin()

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

Definition at line 499 of file cplx.h.

References cplx, exp(), exp(), and im.

◆ sinh()

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

Definition at line 513 of file cplx.h.

References cplx, and exp().

◆ sqrt()

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

Definition at line 467 of file cplx.h.

References cplx, expi(), fabs(), GLBL__, MATH__, sqrt(), TBCI__, and theta().

◆ theta()

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

Definition at line 427 of file cplx.h.

References atan2(), im, LIKELY, pi, T, and UNLIKELY.

Referenced by ln(), power(), power(), and sqrt().

◆ cplx

◆ FGD

template<typename T>
cplx< T > dot FGD ( const cplx< T > & ,
const cplx< T > &  )
friend

References cplx, and dot().

◆ operator<<FGD

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

References cplx, and STD__.

◆ operator>>FGD

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

References cplx, and STD__.

Member Data Documentation

◆ im


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