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

 complex (const _Ty &_Realval=_Ty(), const _Ty &_Imagval=_Ty())
 
_Mytoperator= (const _Ty &_Right)
 
template<class _Other >
 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 > >
 _Complex_base (const _Ty &_Realval, const _Ty &_Imagval)
 
_Ty real (const _Ty &_Right)
 
_Ty real () const
 
_Ty imag (const _Ty &_Right)
 
_Ty imag () const
 

Additional Inherited Members

- Public Attributes inherited from _Complex_value< _Ty >
_Ty _Val [2]
 
- Protected Member Functions inherited from _Complex_base< _Ty, _Complex_value< _Ty > >
void _Add (const complex< _Other > &_Right)
 
void _Sub (const complex< _Other > &_Right)
 
void _Mul (const complex< _Other > &_Right)
 
void _Div (const complex< _Other > &_Right)
 

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>
complex< _Ty >::complex ( const _Ty &  _Realval = _Ty(),
const _Ty &  _Imagval = _Ty() 
)
inline
1142  : _Mybase(_Realval, _Imagval)
1143  { // construct from components of same type
1144  }
_Complex_base< _Ty, _Complex_value< _Ty > > _Mybase
Definition: complex:1139
template<class _Ty>
template<class _Other >
complex< _Ty >::complex ( const complex< _Other > &  _Right)
inline
1155  : _Mybase((_Ty)_Right.real(), (_Ty)_Right.imag())
1156  { // construct from other complex type
1157  }
_Complex_base< _Ty, _Complex_value< _Ty > > _Mybase
Definition: complex:1139
_Ty imag(const _Ty &_Right)
Definition: complex:610
_Ty real(const _Ty &_Right)
Definition: complex:605

Member Function Documentation

template<class _Ty>
_Myt& complex< _Ty >::operator*= ( const _Ty &  _Right)
inline
1180  { // multiply by real
1181  this->_Val[_RE] = this->_Val[_RE] * _Right;
1182  this->_Val[_IM] = this->_Val[_IM] * _Right;
1183  return (*this);
1184  }
_Ty _Val[2]
Definition: complex:585
#define _RE
Definition: complex:40
#define _IM
Definition: complex:41
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty>
_Myt& complex< _Ty >::operator*= ( const _Myt _Right)
inline
1206  { // multiply by other complex
1207  this->_Mul(_Right);
1208  return (*this);
1209  }
const _Ty & _Right
Definition: algorithm:4087
void _Mul(const complex< _Other > &_Right)
Definition: complex:641
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator*= ( const complex< _Other > &  _Right)
inline
1233  { // multiply by other complex
1234  this->_Mul(_Right);
1235  return (*this);
1236  }
void _Mul(const complex< _Other > &_Right)
Definition: complex:641
template<class _Ty>
_Myt& complex< _Ty >::operator+= ( const _Ty &  _Right)
inline
1168  { // add real
1169  this->_Val[_RE] = this->_Val[_RE] + _Right;
1170  return (*this);
1171  }
_Ty _Val[2]
Definition: complex:585
#define _RE
Definition: complex:40
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty>
_Myt& complex< _Ty >::operator+= ( const _Myt _Right)
inline
1194  { // add other complex
1195  this->_Add(_Right);
1196  return (*this);
1197  }
void _Add(const complex< _Other > &_Right)
Definition: complex:627
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator+= ( const complex< _Other > &  _Right)
inline
1219  { // add other complex
1220  this->_Add(_Right);
1221  return (*this);
1222  }
void _Add(const complex< _Other > &_Right)
Definition: complex:627
template<class _Ty>
_Myt& complex< _Ty >::operator-= ( const _Ty &  _Right)
inline
1174  { // subtract real
1175  this->_Val[_RE] = this->_Val[_RE] - _Right;
1176  return (*this);
1177  }
_Ty _Val[2]
Definition: complex:585
#define _RE
Definition: complex:40
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty>
_Myt& complex< _Ty >::operator-= ( const _Myt _Right)
inline
1200  { // subtract other complex
1201  this->_Sub(_Right);
1202  return (*this);
1203  }
void _Sub(const complex< _Other > &_Right)
Definition: complex:634
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator-= ( const complex< _Other > &  _Right)
inline
1226  { // subtract other complex
1227  this->_Sub(_Right);
1228  return (*this);
1229  }
void _Sub(const complex< _Other > &_Right)
Definition: complex:634
template<class _Ty>
_Myt& complex< _Ty >::operator/= ( const _Ty &  _Right)
inline
1187  { // divide by real
1188  this->_Val[_RE] = this->_Val[_RE] / _Right;
1189  this->_Val[_IM] = this->_Val[_IM] / _Right;
1190  return (*this);
1191  }
_Ty _Val[2]
Definition: complex:585
#define _RE
Definition: complex:40
#define _IM
Definition: complex:41
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty>
_Myt& complex< _Ty >::operator/= ( const _Myt _Right)
inline
1212  { // divide by other complex
1213  this->_Div(_Right);
1214  return (*this);
1215  }
void _Div(const complex< _Other > &_Right)
Definition: complex:654
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator/= ( const complex< _Other > &  _Right)
inline
1240  { // divide by other complex
1241  this->_Div(_Right);
1242  return (*this);
1243  }
void _Div(const complex< _Other > &_Right)
Definition: complex:654
template<class _Ty>
_Myt& complex< _Ty >::operator= ( const _Ty &  _Right)
inline
1147  { // assign real
1148  this->_Val[_RE] = _Right;
1149  this->_Val[_IM] = _Ty();
1150  return (*this);
1151  }
_Ty _Val[2]
Definition: complex:585
#define _RE
Definition: complex:40
#define _IM
Definition: complex:41
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty>
template<class _Other >
_Myt& complex< _Ty >::operator= ( const complex< _Other > &  _Right)
inline
1161  { // assign other complex type
1162  this->_Val[_RE] = (_Ty)_Right.real();
1163  this->_Val[_IM] = (_Ty)_Right.imag();
1164  return (*this);
1165  }
_Ty _Val[2]
Definition: complex:585
#define _RE
Definition: complex:40
_Ty imag(const _Ty &_Right)
Definition: complex:610
_Ty real(const _Ty &_Right)
Definition: complex:605
#define _IM
Definition: complex:41

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