STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Macros | Functions | Variables
xcomplex File Reference

Macros

#define _GENERIC_MATHC0X(FUN, VAL)
 
#define _GENERIC_MATHC1X(FUN, VAL)
 

Functions

 _TMPLT (_Ty) inline _CMPLX(_Ty) operator+(const _CMPLX(_Ty)&_Left
 
const _CMPLX (_Ty)&_Right)
 
_Tmp real (_Tmp.real()+_Right)
 
 return (_Tmp)
 
_Tmp real (_Tmp.real()-_Right)
 
_Tmp real (_Tmp.real()*_Right)
 
_Tmp imag (_Tmp.imag()*_Right)
 
_Tmp real (_Tmp.real()/_Right)
 
_Tmp imag (_Tmp.imag()/_Right)
 
 if (_Right< 0) _Count=0-_Count
 
 for (_CMPLX(_Ty) _Zv=_CMPLX(_Ty)(1);;_Tmp *=_Tmp)
 
else return (exp(_Right *log(_CMPLX(_Ty)(_Left))))
 
else return (exp(_Right *log(_Left)))
 
template<class _Ty1 , class _Ty2 >
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > polar (const _Ty1 &_Left, const _Ty2 &_Right)
 
template<class _Ty1 , class _Ty2 >
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow (const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow (const complex< _Ty1 > &_Left, const _Ty2 &_Right)
 
template<class _Ty1 , class _Ty2 >
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow (const _Ty1 &_Left, const complex< _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
enable_if< is_integral< _Ty1 >::value &&is_integral< _Ty2 >::value, complex< _Ty1 > >::type pow (const complex< _Ty1 > &_Left, _Ty2 &_Right)
 

Variables

const _Ty & _Right
 
unsigned int _Count = _Right
 
const _Ty & _Theta
 

Macro Definition Documentation

#define _GENERIC_MATHC0X (   FUN,
  VAL 
)
Value:
template<class _Ty> inline \
typename _Promote_to_float<_Ty>::type>::type \
FUN(_Ty) \
{ \
typedef typename _Promote_to_float<_Ty>::type type; \
return ((type)VAL); \
}
return(_Tmp)
Definition: xtr1common:66
#define _GENERIC_MATHC1X (   FUN,
  VAL 
)
Value:
template<class _Ty> inline \
typename _Promote_to_float<_Ty>::type>::type \
FUN(_Ty _Left) \
{ \
typedef typename _Promote_to_float<_Ty>::type type; \
return ((type)VAL); \
}
return(_Tmp)
Definition: xtr1common:66

Function Documentation

const _CMPLX ( _Ty  )
8  { // add complex to complex
9  _CMPLX(_Ty) _Tmp(_Left);
10  return (_Tmp += _Right);
11  }
const _Ty & _Right
Definition: xcomplex:16
return(_Tmp)
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
_TMPLT ( _Ty  ) const
113  { // return +complex
114  return (_CMPLX(_Ty)(_Left));
115  }
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
for ( _CMPLX(_Ty)  _Zv = _CMPLX(_Ty)(1); ; _Tmp *= _Tmp)
674  { // fold in _Left ^ (2 ^ _Count) as needed
675  if ((_Count & 1) != 0)
676  _Zv *= _Tmp;
677  if ((_Count >>= 1) == 0)
678  return (_Right < 0 ? _CMPLX(_Ty)(1) / _Zv : _Zv);
679  }
const _Ty & _Right
Definition: xcomplex:16
unsigned int _Count
Definition: xcomplex:668
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
if ( )
pure virtual
_Tmp imag ( _Tmp.imag()*  _Right)
_Tmp imag ( _Tmp.imag()/  _Right)
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> polar ( const _Ty1 &  _Left,
const _Ty2 &  _Right 
)
inline
885  { // bring mixed types to a common type
887  return (_STD polar((type)_Left, (type)_Right));
888  }
const _Ty & _Right
Definition: xcomplex:16
Definition: complex:49
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > polar(const _Ty1 &_Left, const _Ty2 &_Right)
Definition: xcomplex:884
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const complex< _Ty1 > &  _Left,
const complex< _Ty2 > &  _Right 
)
inline
895  { // bring mixed types to a common type
897  return (_STD pow(type(_Left), type(_Right)));
898  }
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:894
Definition: complex:49
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const complex< _Ty1 > &  _Left,
const _Ty2 &  _Right 
)
inline
904  { // bring mixed types to a common type
906  return (_STD pow(type(_Left), type(_Right)));
907  }
const _Ty & _Right
Definition: xcomplex:16
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:894
Definition: complex:49
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const _Ty1 &  _Left,
const complex< _Ty2 > &  _Right 
)
inline
913  { // bring mixed types to a common type
915  return (_STD pow(type(_Left), type(_Right)));
916  }
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:894
Definition: complex:49
template<class _Ty1 , class _Ty2 >
enable_if<is_integral<_Ty1>::value && is_integral<_Ty2>::value, complex<_Ty1> >::type pow ( const complex< _Ty1 > &  _Left,
_Ty2 &  _Right 
)
inline
923  { // raise Gaussian integer to an integer power
924  typedef complex<_Ty1> type;
925  type _Ans = type(1, 0);
926 
927  if (_Right < 0)
928  _Ans = type(0, 0); // ignore 1/type(0, 0) error
929  else if (0 < _Right)
930  { // raise to a positive power
931  for (type _Factor = _Left; ; _Factor *= _Factor)
932  { // fold in _Left^(2^N))
933  if ((_Right & 1) != 0)
934  _Ans *= _Factor;
935  if ((_Right >>= 1) == 0)
936  break;
937  }
938  }
939  return (_Ans);
940  }
const _Ty & _Right
Definition: xcomplex:16
Definition: complex:49
_Tmp real ( _Tmp.real()+  _Right)
_Tmp real ( _Tmp.real()-  _Right)
_Tmp real ( _Tmp.real()*  _Right)
_Tmp real ( _Tmp.real()/  _Right)
return ( _Tmp  )
else return ( exp(_Right *log(_CMPLX(_Ty)(_Left)))  )
else return ( exp(_Right *log(_Left))  )

Variable Documentation

unsigned int _Count = _Right
const _Ty& _Right
Initial value:
{
_CMPLX(_Ty) _Tmp(_Left)
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
const _Ty& _Theta
Initial value:
{
return (_CMPLX(_Ty)(_Rho * _CTR(_Ty)::cos(_Theta),
_Rho * _CTR(_Ty)::sin(_Theta)))
float sin(float _X) __GPU_ONLY
Calculates the sine value of the argument
Definition: amp_math.h:1010
const _Ty & _Theta
Definition: xcomplex:822
float cos(float _X) __GPU_ONLY
Calculates the cosine of the argument
Definition: amp_math.h:415
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
#define _CTR(T)
Definition: complex:1247