STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | List of all members
complex< _Ty > Class Template Reference
Inheritance diagram for complex< _Ty >:
_Complex_base< _Ty, _Complex_value< _Ty > > _Complex_value< _Ty >

Public Types

typedef complex< _Ty > _Myt
 
typedef _Complex_base< _Ty, _Complex_value< _Ty > > _Mybase
 
- Public Types inherited from _Complex_base< _Ty, _Complex_value< _Ty > >
typedef _Ctraits< _Ty > _Myctraits
 
typedef _Complex_base< _Ty, _Complex_value< _Ty > > _Myt
 
typedef _Ty value_type
 
- Public Types inherited from _Complex_value< _Ty >
enum  { _Re = 0, _Im = 1 }
 

Public Member Functions

constexpr complex (const _Ty &_Realval=_Ty(), const _Ty &_Imagval=_Ty())
 
_Mytoperator= (const _Ty &_Right)
 
template<class _Other >
constexpr complex (const complex< _Other > &_Right)
 
template<class _Other >
_Mytoperator= (const complex< _Other > &_Right)
 
_Mytoperator+= (const _Ty &_Right)
 
_Mytoperator-= (const _Ty &_Right)
 
_Mytoperator*= (const _Ty &_Right)
 
_Mytoperator/= (const _Ty &_Right)
 
_Mytoperator+= (const _Myt &_Right)
 
_Mytoperator-= (const _Myt &_Right)
 
_Mytoperator*= (const _Myt &_Right)
 
_Mytoperator/= (const _Myt &_Right)
 
template<class _Other >
_Mytoperator+= (const complex< _Other > &_Right)
 
template<class _Other >
_Mytoperator-= (const complex< _Other > &_Right)
 
template<class _Other >
_Mytoperator*= (const complex< _Other > &_Right)
 
template<class _Other >
_Mytoperator/= (const complex< _Other > &_Right)
 
- Public Member Functions inherited from _Complex_base< _Ty, _Complex_value< _Ty > >
constexpr _Complex_base (const _Ty &_Realval, const _Ty &_Imagval)
 

Additional Inherited Members

- Public Attributes inherited from _Complex_value< _Ty >
_Ty _Val [2]
 

Member Typedef Documentation

template<class _Ty>
typedef _Complex_base<_Ty, _Complex_value<_Ty> > complex< _Ty >::_Mybase
template<class _Ty>
typedef complex<_Ty> complex< _Ty >::_Myt

Constructor & Destructor Documentation

template<class _Ty>
constexpr complex< _Ty >::complex ( const _Ty &  _Realval = _Ty(),
const _Ty &  _Imagval = _Ty() 
)
inline
1143  : _Mybase(_Realval, _Imagval)
1144  { // construct from components of same type
1145  }
_Complex_base< _Ty, _Complex_value< _Ty > > _Mybase
Definition: complex:1139
template<class _Ty>
template<class _Other >
constexpr complex< _Ty >::complex ( const complex< _Other > &  _Right)
inline
1156  : _Mybase((_Ty)_Right.real(), (_Ty)_Right.imag())
1157  { // construct from other complex type
1158  }
_Complex_base< _Ty, _Complex_value< _Ty > > _Mybase
Definition: complex:1139

Member Function Documentation

template<class _Ty>
_Myt& complex< _Ty >::operator*= ( const _Ty &  _Right)
inline
1181  { // multiply by real
1182  this->_Val[_RE] = this->_Val[_RE] * _Right;
1183  this->_Val[_IM] = this->_Val[_IM] * _Right;
1184  return (*this);
1185  }
_Ty _Val[2]
Definition: complex:586
#define _RE
Definition: complex:41
#define _IM
Definition: complex:42
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
_Myt& complex< _Ty >::operator*= ( const _Myt _Right)
inline
1207  { // multiply by other complex
1208  this->_Mul(_Right);
1209  return (*this);
1210  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator*= ( const complex< _Other > &  _Right)
inline
1234  { // multiply by other complex
1235  this->_Mul(_Right);
1236  return (*this);
1237  }
template<class _Ty>
_Myt& complex< _Ty >::operator+= ( const _Ty &  _Right)
inline
1169  { // add real
1170  this->_Val[_RE] = this->_Val[_RE] + _Right;
1171  return (*this);
1172  }
_Ty _Val[2]
Definition: complex:586
#define _RE
Definition: complex:41
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
_Myt& complex< _Ty >::operator+= ( const _Myt _Right)
inline
1195  { // add other complex
1196  this->_Add(_Right);
1197  return (*this);
1198  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator+= ( const complex< _Other > &  _Right)
inline
1220  { // add other complex
1221  this->_Add(_Right);
1222  return (*this);
1223  }
template<class _Ty>
_Myt& complex< _Ty >::operator-= ( const _Ty &  _Right)
inline
1175  { // subtract real
1176  this->_Val[_RE] = this->_Val[_RE] - _Right;
1177  return (*this);
1178  }
_Ty _Val[2]
Definition: complex:586
#define _RE
Definition: complex:41
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
_Myt& complex< _Ty >::operator-= ( const _Myt _Right)
inline
1201  { // subtract other complex
1202  this->_Sub(_Right);
1203  return (*this);
1204  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator-= ( const complex< _Other > &  _Right)
inline
1227  { // subtract other complex
1228  this->_Sub(_Right);
1229  return (*this);
1230  }
template<class _Ty>
_Myt& complex< _Ty >::operator/= ( const _Ty &  _Right)
inline
1188  { // divide by real
1189  this->_Val[_RE] = this->_Val[_RE] / _Right;
1190  this->_Val[_IM] = this->_Val[_IM] / _Right;
1191  return (*this);
1192  }
_Ty _Val[2]
Definition: complex:586
#define _RE
Definition: complex:41
#define _IM
Definition: complex:42
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
_Myt& complex< _Ty >::operator/= ( const _Myt _Right)
inline
1213  { // divide by other complex
1214  this->_Div(_Right);
1215  return (*this);
1216  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator/= ( const complex< _Other > &  _Right)
inline
1241  { // divide by other complex
1242  this->_Div(_Right);
1243  return (*this);
1244  }
template<class _Ty>
_Myt& complex< _Ty >::operator= ( const _Ty &  _Right)
inline
1148  { // assign real
1149  this->_Val[_RE] = _Right;
1150  this->_Val[_IM] = _Ty();
1151  return (*this);
1152  }
_Ty _Val[2]
Definition: complex:586
#define _RE
Definition: complex:41
#define _IM
Definition: complex:42
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator= ( const complex< _Other > &  _Right)
inline
1162  { // assign other complex type
1163  this->_Val[_RE] = (_Ty)_Right.real();
1164  this->_Val[_IM] = (_Ty)_Right.imag();
1165  return (*this);
1166  }
_Ty _Val[2]
Definition: complex:586
#define _RE
Definition: complex:41
#define _IM
Definition: complex:42

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