TBCI Numerical high perf. C++ Library 2.8.0
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...

Macros

#define CPLX(t)
#define CPLXR(t, a, r)
#define CPLXRI(t, a, r, i)
#define CPLXC(t, a, c)
#define CPLXVRI(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

◆ CPLX

#define CPLX ( t)
Value:
Our own complex class.
Definition cplx.h:56

Definition at line 31 of file cplx.h.

◆ CPLXC

#define CPLXC ( t,
a,
c )
Value:
return c
Definition f_matrix.h:760
const unsigned TMatrix< T > const Matrix< T > * a

Definition at line 34 of file cplx.h.

◆ CPLXR

#define CPLXR ( t,
a,
r )
Value:

Definition at line 32 of file cplx.h.

◆ CPLXRI

#define CPLXRI ( t,
a,
r,
i )
Value:
cplx<t> a (r,i)
int i
Definition LM_fit.h:71

Definition at line 33 of file cplx.h.

◆ CPLXVRI

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

Definition at line 35 of file cplx.h.

Function Documentation

◆ abs()

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

Definition at line 741 of file cplx.h.

References abs, c, T, and TBCI__.

◆ acos()

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

Definition at line 816 of file cplx.h.

References acos(), and TBCI__.

Referenced by acos().

◆ acosh()

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

Definition at line 821 of file cplx.h.

References acosh(), and TBCI__.

Referenced by acosh().

◆ arg()

◆ asin()

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

Definition at line 806 of file cplx.h.

References asin(), and TBCI__.

Referenced by asin().

◆ asinh()

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

Definition at line 811 of file cplx.h.

References asinh(), and TBCI__.

Referenced by asinh().

◆ atan()

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

Definition at line 826 of file cplx.h.

References atan(), and TBCI__.

Referenced by atan(), zbknu_(), zlog_(), zsqrt_(), and zunhj_().

◆ atanh()

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

Definition at line 831 of file cplx.h.

References atanh(), and TBCI__.

Referenced by atanh().

◆ conj()

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

◆ cos()

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

◆ cosh()

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

Definition at line 791 of file cplx.h.

References cosh(), and TBCI__.

Referenced by cosh(), and zshch_().

◆ dot()

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

Definition at line 300 of file cplx.h.

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

Referenced by BiCGSTAB(), CG(), CGS(), dot(), and cplx< T >::FGD.

◆ exp()

◆ expi()

template<typename T>
cplx< T > expi ( const T phi)

◆ fabs()

◆ fabssqr()

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

Definition at line 390 of file cplx.h.

References c.

Referenced by BiCGSTAB(), F_Matrix< T >::fabs(), F_TSMatrix< T >::fabs(), fabs(), fabs(), fabssqr(), fabssqr(), fabssqr(), fabssqr(), fabssqr(), and QMR().

◆ imag() [1/2]

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

Definition at line 674 of file cplx.h.

References T, and TBCI__.

Referenced by eig(), eig(), cplx< T >::exp(), imag(), and imag().

◆ imag() [2/2]

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

Definition at line 684 of file cplx.h.

References T, and TBCI__.

◆ log()

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

◆ log10()

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

Definition at line 836 of file cplx.h.

References log(), log10, and TBCI__.

◆ norm()

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

Definition at line 695 of file cplx.h.

References c, norm(), and TBCI__.

Referenced by TVector< T >::BdMatrix< T >, norm(), operator/(), operator/(), and Vector< T >::operator/().

◆ operator*()

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

Definition at line 336 of file cplx.h.

References a, b, and T.

◆ operator+()

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

Definition at line 317 of file cplx.h.

References a, b, and T.

◆ operator-()

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

Definition at line 323 of file cplx.h.

References a, b, and T.

◆ operator/()

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

Definition at line 342 of file cplx.h.

References a, b, and T.

◆ operator<<()

template<typename T>
STD__ ostream & operator<< ( STD__ ostream & os,
const cplx< T > & c )

Definition at line 621 of file cplx.h.

References c, and STD__.

◆ operator>>()

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

Definition at line 627 of file cplx.h.

References ALIGN, c, i, MIN_ALIGN, STD__, and T.

◆ polar()

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 expi(), p, polar(), T, and TBCI__.

Referenced by polar().

◆ pow() [1/2]

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 pow(), and TBCI__.

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

◆ pow() [2/2]

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 pow(), TBCI__, and x.

◆ real() [1/2]

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

Definition at line 671 of file cplx.h.

References real, T, and TBCI__.

◆ real() [2/2]

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

Definition at line 681 of file cplx.h.

References real, T, and TBCI__.

◆ sin()

◆ sinh()

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

Definition at line 781 of file cplx.h.

References sinh(), and TBCI__.

Referenced by sinh(), and zshch_().

◆ SPEC_TBCI_TRAITS_ALWAYS_COPY() [1/2]

SPEC_TBCI_TRAITS_ALWAYS_COPY ( TBCI__ cplx< double > * )

References NAMESPACE_END, and TBCI__.

◆ SPEC_TBCI_TRAITS_ALWAYS_COPY() [2/2]

SPEC_TBCI_TRAITS_ALWAYS_COPY ( TBCI__ cplx< float > * )

References TBCI__.

◆ SPEC_TBCI_TRAITS_LOOP_COPY() [1/2]

SPEC_TBCI_TRAITS_LOOP_COPY ( TBCI__ cplx< double > )

References TBCI__.

◆ SPEC_TBCI_TRAITS_LOOP_COPY() [2/2]

NAMESPACE_CSTD_END NAMESPACE_TBCI SPEC_TBCI_TRAITS_LOOP_COPY ( TBCI__ cplx< float > )

References TBCI__.

◆ sqr()

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

◆ sqrt() [1/2]

◆ sqrt() [2/2]

◆ tan()

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

Definition at line 796 of file cplx.h.

References tan(), and TBCI__.

Referenced by tan().

◆ tanh()

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

Definition at line 801 of file cplx.h.

References tanh(), and TBCI__.

Referenced by tanh().