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
1139  : _Mybase(_Realval, _Imagval)
1140  { // construct from components of same type
1141  }
_Complex_base< _Ty, _Complex_value< _Ty > > _Mybase
Definition: complex:1135
template<class _Ty>
template<class _Other >
constexpr complex< _Ty >::complex ( const complex< _Other > &  _Right)
inline
1152  : _Mybase((_Ty)_Right.real(), (_Ty)_Right.imag())
1153  { // construct from other complex type
1154  }
_Complex_base< _Ty, _Complex_value< _Ty > > _Mybase
Definition: complex:1135

Member Function Documentation

template<class _Ty>
_Myt& complex< _Ty >::operator*= ( const _Ty &  _Right)
inline
1177  { // multiply by real
1178  this->_Val[_RE] = this->_Val[_RE] * _Right;
1179  this->_Val[_IM] = this->_Val[_IM] * _Right;
1180  return (*this);
1181  }
_Ty _Val[2]
Definition: complex:582
#define _RE
Definition: complex:37
#define _IM
Definition: complex:38
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
_Myt& complex< _Ty >::operator*= ( const _Myt _Right)
inline
1203  { // multiply by other complex
1204  this->_Mul(_Right);
1205  return (*this);
1206  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator*= ( const complex< _Other > &  _Right)
inline
1230  { // multiply by other complex
1231  this->_Mul(_Right);
1232  return (*this);
1233  }
template<class _Ty>
_Myt& complex< _Ty >::operator+= ( const _Ty &  _Right)
inline
1165  { // add real
1166  this->_Val[_RE] = this->_Val[_RE] + _Right;
1167  return (*this);
1168  }
_Ty _Val[2]
Definition: complex:582
#define _RE
Definition: complex:37
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
_Myt& complex< _Ty >::operator+= ( const _Myt _Right)
inline
1191  { // add other complex
1192  this->_Add(_Right);
1193  return (*this);
1194  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator+= ( const complex< _Other > &  _Right)
inline
1216  { // add other complex
1217  this->_Add(_Right);
1218  return (*this);
1219  }
template<class _Ty>
_Myt& complex< _Ty >::operator-= ( const _Ty &  _Right)
inline
1171  { // subtract real
1172  this->_Val[_RE] = this->_Val[_RE] - _Right;
1173  return (*this);
1174  }
_Ty _Val[2]
Definition: complex:582
#define _RE
Definition: complex:37
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
_Myt& complex< _Ty >::operator-= ( const _Myt _Right)
inline
1197  { // subtract other complex
1198  this->_Sub(_Right);
1199  return (*this);
1200  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator-= ( const complex< _Other > &  _Right)
inline
1223  { // subtract other complex
1224  this->_Sub(_Right);
1225  return (*this);
1226  }
template<class _Ty>
_Myt& complex< _Ty >::operator/= ( const _Ty &  _Right)
inline
1184  { // divide by real
1185  this->_Val[_RE] = this->_Val[_RE] / _Right;
1186  this->_Val[_IM] = this->_Val[_IM] / _Right;
1187  return (*this);
1188  }
_Ty _Val[2]
Definition: complex:582
#define _RE
Definition: complex:37
#define _IM
Definition: complex:38
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
_Myt& complex< _Ty >::operator/= ( const _Myt _Right)
inline
1209  { // divide by other complex
1210  this->_Div(_Right);
1211  return (*this);
1212  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator/= ( const complex< _Other > &  _Right)
inline
1237  { // divide by other complex
1238  this->_Div(_Right);
1239  return (*this);
1240  }
template<class _Ty>
_Myt& complex< _Ty >::operator= ( const _Ty &  _Right)
inline
1144  { // assign real
1145  this->_Val[_RE] = _Right;
1146  this->_Val[_IM] = _Ty();
1147  return (*this);
1148  }
_Ty _Val[2]
Definition: complex:582
#define _RE
Definition: complex:37
#define _IM
Definition: complex:38
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator= ( const complex< _Other > &  _Right)
inline
1158  { // assign other complex type
1159  this->_Val[_RE] = (_Ty)_Right.real();
1160  this->_Val[_IM] = (_Ty)_Right.imag();
1161  return (*this);
1162  }
_Ty _Val[2]
Definition: complex:582
#define _RE
Definition: complex:37
#define _IM
Definition: complex:38

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