TBCI Numerical high perf. C++ Library  2.8.0
Classes | Macros | Functions
cplx.h File Reference

Rich implementation of complex numbers TBCI::cplx. More...

#include "tbci/basics.h"
#include "tbci/constants.h"
#include "cplx_memalloc.h"
Include dependency graph for cplx.h:

Go to the source code of this file.

Classes

class  cplx< T >
 Our own complex class. More...
 
class  cplx< T >
 Our own complex class. More...
 

Macros

#define CPLX(t)   cplx<t>
 
#define CPLXR(t, a, r)   cplx<t> a (r)
 
#define CPLXRI(t, a, r, i)   cplx<t> a (r,i)
 
#define CPLXC(t, a, c)   cplx<t> a (c)
 
#define CPLXVRI(t, r, i)   (cplx<t>(r,i))
 

Functions

template<typename T >
NAMESPACE_END NAMESPACE_CSTD TBCI__ cplx< Tsqrt (const TBCI__ cplx< T > &z)
 
template<typename T >
cplx< Tdot (const cplx< T > &a, const cplx< T > &b)
 
template<typename T >
cplx< Toperator+ (const T a, const cplx< T > &b)
 
template<typename T >
cplx< Toperator- (const T a, const cplx< T > &b)
 
template<typename T >
cplx< Toperator* (const T a, const cplx< T > &b)
 
template<typename T >
cplx< Toperator/ (const T a, const cplx< T > &b)
 
template<typename T >
double fabssqr (const cplx< T > &c)
 
template<typename T >
cplx< Tsqr (const cplx< T > &c)
 
template<typename T >
cplx< Texpi (const T phi)
 
template<typename T >
STD__ ostream & operator<< (STD__ ostream &os, const cplx< T > &c)
 
template<typename T >
STD__ istream & operator>> (STD__ istream &in, cplx< T > &c)
 
template<typename T >
NAMESPACE_END NAMESPACE_CPLX TBCI__ cplx< Tconj (const TBCI__ cplx< T > &c)
 
template<typename T >
T real (const TBCI__ cplx< T > &z)
 
template<typename T >
T imag (const TBCI__ cplx< T > &z)
 
template<typename T >
Treal (TBCI__ cplx< T > &z)
 
template<typename T >
Timag (TBCI__ cplx< T > &z)
 
template<typename T >
T arg (const TBCI__ cplx< T > &c)
 
template<typename T >
double norm (const TBCI__ cplx< T > &c)
 
template<typename T >
NAMESPACE_CPLX_END NAMESPACE_TBCI TBCI__ cplx< Tpolar (const T &r, const T &p)
 
template<typename T >
NAMESPACE_END NAMESPACE_CSTD T abs (const TBCI__ cplx< T > &c)
 
template<typename T >
double fabs (const TBCI__ cplx< T > &c)
 
template<typename T >
TBCI__ cplx< Tsqrt (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Texp (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tpow (const TBCI__ cplx< T > &z, const double n)
 
template<typename T >
TBCI__ cplx< Tpow (const TBCI__ cplx< T > &z, const TBCI__ cplx< T > &x)
 
template<typename T >
TBCI__ cplx< Tlog (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tsin (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tsinh (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tcos (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tcosh (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Ttan (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Ttanh (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tasin (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tasinh (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tacos (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tacosh (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tatan (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tatanh (const TBCI__ cplx< T > &z)
 
template<typename T >
TBCI__ cplx< Tlog10 (const TBCI__ cplx< T > &z)
 
NAMESPACE_CSTD_END NAMESPACE_TBCI SPEC_TBCI_TRAITS_LOOP_COPY (TBCI__ cplx< float >)
 
 SPEC_TBCI_TRAITS_LOOP_COPY (TBCI__ cplx< double >)
 
 SPEC_TBCI_TRAITS_ALWAYS_COPY (TBCI__ cplx< float > *)
 
 SPEC_TBCI_TRAITS_ALWAYS_COPY (TBCI__ cplx< double > *)
 

Detailed Description

Rich implementation of complex numbers TBCI::cplx.

Definition in file cplx.h.

Macro Definition Documentation

#define CPLX (   t)    cplx<t>

Definition at line 31 of file cplx.h.

#define CPLXC (   t,
  a,
  c 
)    cplx<t> a (c)

Definition at line 34 of file cplx.h.

#define CPLXR (   t,
  a,
 
)    cplx<t> a (r)

Definition at line 32 of file cplx.h.

#define CPLXRI (   t,
  a,
  r,
  i 
)    cplx<t> a (r,i)

Definition at line 33 of file cplx.h.

#define CPLXVRI (   t,
  r,
  i 
)    (cplx<t>(r,i))

Definition at line 35 of file cplx.h.

Function Documentation

template<typename T >
NAMESPACE_END NAMESPACE_CSTD T abs ( const TBCI__ cplx< T > &  c)
inline

Definition at line 741 of file cplx.h.

References cplx< T >::fabs(), INST, and TBCI__.

template<typename T >
TBCI__ cplx<T> acos ( const TBCI__ cplx< T > &  z)
inline

Definition at line 816 of file cplx.h.

References cplx< T >::acosh(), INST, and TBCI__.

Referenced by operator<=().

template<typename T >
TBCI__ cplx<T> acosh ( const TBCI__ cplx< T > &  z)
inline

Definition at line 821 of file cplx.h.

References cplx< T >::atan(), INST, and TBCI__.

template<typename T >
T arg ( const TBCI__ cplx< T > &  c)
inline
template<typename T >
TBCI__ cplx<T> asin ( const TBCI__ cplx< T > &  z)
inline

Definition at line 806 of file cplx.h.

References cplx< T >::asinh(), INST, and TBCI__.

Referenced by operator<=().

template<typename T >
TBCI__ cplx<T> asinh ( const TBCI__ cplx< T > &  z)
inline

Definition at line 811 of file cplx.h.

References cplx< T >::acos(), INST, and TBCI__.

template<typename T >
TBCI__ cplx<T> atan ( const TBCI__ cplx< T > &  z)
inline

Definition at line 826 of file cplx.h.

References cplx< T >::atanh(), INST, and TBCI__.

Referenced by operator<=(), zbknu_(), zlog_(), zsqrt_(), and zunhj_().

template<typename T >
TBCI__ cplx<T> atanh ( const TBCI__ cplx< T > &  z)
inline

Definition at line 831 of file cplx.h.

References INST, log10(), and TBCI__.

Referenced by operator<=().

template<typename T >
NAMESPACE_END NAMESPACE_CPLX TBCI__ cplx<T> conj ( const TBCI__ cplx< T > &  c)
inline

Definition at line 663 of file cplx.h.

References cplx< T >::imag(), INST, T, and TBCI__.

template<typename T >
TBCI__ cplx<T> cos ( const TBCI__ cplx< T > &  z)
inline
template<typename T >
TBCI__ cplx<T> cosh ( const TBCI__ cplx< T > &  z)
inline

Definition at line 791 of file cplx.h.

References INST, tan(), and TBCI__.

Referenced by operator<=(), and zshch_().

template<typename T >
cplx<T> dot ( const cplx< T > &  a,
const cplx< T > &  b 
)
inline

Definition at line 300 of file cplx.h.

References cplx< T >::im.

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

template<typename T >
TBCI__ cplx<T> exp ( const TBCI__ cplx< T > &  z)
inline
template<typename T >
cplx<T> expi ( const T  phi)
template<typename T >
double fabs ( const TBCI__ cplx< T > &  c)
inline

Definition at line 746 of file cplx.h.

References INST, and TBCI__.

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

Definition at line 390 of file cplx.h.

References cplx< T >::fabssqr().

template<typename T >
T imag ( const TBCI__ cplx< T > &  z)
inline

Definition at line 674 of file cplx.h.

References cplx< T >::imag(), INST, T, and TBCI__.

template<typename T >
T& imag ( TBCI__ cplx< T > &  z)
inline

Definition at line 684 of file cplx.h.

References arg(), INST, T, and TBCI__.

template<typename T >
TBCI__ cplx<T> log ( const TBCI__ cplx< T > &  z)
inline
template<typename T >
TBCI__ cplx<T> log10 ( const TBCI__ cplx< T > &  z)
inline
template<typename T >
double norm ( const TBCI__ cplx< T > &  c)
inline

Definition at line 695 of file cplx.h.

References INST, NAMESPACE_CPLX_END, NAMESPACE_TBCI, polar(), T, and TBCI__.

Referenced by fabssqr(), operator/(), and Vector< T >::operator/().

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

Definition at line 336 of file cplx.h.

References INST, cplx< T >::mult(), and T.

template<typename T >
cplx<T> operator+ ( const T  a,
const cplx< T > &  b 
)
inline
template<typename T >
cplx<T> operator- ( const T  a,
const cplx< T > &  b 
)
inline
template<typename T >
cplx<T> operator/ ( const T  a,
const cplx< T > &  b 
)
inline
template<typename T >
STD__ ostream& operator<< ( STD__ ostream &  os,
const cplx< T > &  c 
)

Definition at line 621 of file cplx.h.

References cplx< T >::im.

template<typename T >
STD__ istream& operator>> ( STD__ istream &  in,
cplx< T > &  c 
)

Definition at line 627 of file cplx.h.

References cplx< T >::ALIGN(), cplx< T >::conj(), i, cplx< T >::im, INST, MIN_ALIGN, NAMESPACE_CPLX, NAMESPACE_END, T, and TBCI__.

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

template<typename T >
NAMESPACE_CPLX_END NAMESPACE_TBCI TBCI__ cplx<T> polar ( const T r,
const T p 
)
inline

Definition at line 706 of file cplx.h.

References cplx< T >::abs(), expi(), i, cplx< T >::im, INST, NAMESPACE_CSTD, NAMESPACE_END, cplx< T >::operator*(), REGISTER, T, and TBCI__.

Referenced by norm().

template<typename T >
TBCI__ cplx<T> pow ( const TBCI__ cplx< T > &  z,
const double  n 
)
inline

Definition at line 761 of file cplx.h.

References INST, and TBCI__.

Referenced by chi_s(), exp(), expm(), expm2(), expm3(), fact(), poisson(), and cplx< T >::power().

template<typename T >
TBCI__ cplx<T> pow ( const TBCI__ cplx< T > &  z,
const TBCI__ cplx< T > &  x 
)
inline

Definition at line 766 of file cplx.h.

References INST, log(), and TBCI__.

template<typename T >
T real ( const TBCI__ cplx< T > &  z)
inline

Definition at line 671 of file cplx.h.

template<typename T >
T& real ( TBCI__ cplx< T > &  z)
inline

Definition at line 681 of file cplx.h.

template<typename T >
TBCI__ cplx<T> sin ( const TBCI__ cplx< T > &  z)
inline
template<typename T >
TBCI__ cplx<T> sinh ( const TBCI__ cplx< T > &  z)
inline

Definition at line 781 of file cplx.h.

References cplx< T >::cos(), INST, and TBCI__.

Referenced by operator<=(), and zshch_().

SPEC_TBCI_TRAITS_ALWAYS_COPY ( TBCI__ cplx< float > *  )

Referenced by log10().

SPEC_TBCI_TRAITS_ALWAYS_COPY ( TBCI__ cplx< double > *  )
NAMESPACE_CSTD_END NAMESPACE_TBCI SPEC_TBCI_TRAITS_LOOP_COPY ( TBCI__ cplx< float >  )

Referenced by log10().

SPEC_TBCI_TRAITS_LOOP_COPY ( TBCI__ cplx< double >  )
template<typename T >
cplx<T> sqr ( const cplx< T > &  c)
inline
template<typename T >
NAMESPACE_END NAMESPACE_CSTD TBCI__ cplx<T> sqrt ( const TBCI__ cplx< T > &  z)
inline

Definition at line 751 of file cplx.h.

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

template<typename T >
TBCI__ cplx<T> sqrt ( const TBCI__ cplx< T > &  z)
inline

Definition at line 751 of file cplx.h.

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

template<typename T >
TBCI__ cplx<T> tan ( const TBCI__ cplx< T > &  z)
inline

Definition at line 796 of file cplx.h.

References INST, tanh(), and TBCI__.

Referenced by cosh(), and operator<=().

template<typename T >
TBCI__ cplx<T> tanh ( const TBCI__ cplx< T > &  z)
inline

Definition at line 801 of file cplx.h.

References cplx< T >::asin(), INST, and TBCI__.

Referenced by operator<=(), and tan().